Refactor catalog filters: remove badges, use select dropdowns
All checks were successful
Build Docker Image / build (push) Successful in 4m21s
All checks were successful
Build Docker Image / build (push) Successful in 4m21s
- Remove filter from suppliers page (not needed) - Offers: show all active offers directly, add product type filter as select - Hubs: change filter from pills to select dropdown - Create CatalogFilterSelect component for dropdown filters - Update useCatalogOffers to always filter active, use product filter
This commit is contained in:
31
app/components/catalog/CatalogFilterSelect.vue
Normal file
31
app/components/catalog/CatalogFilterSelect.vue
Normal file
@@ -0,0 +1,31 @@
|
||||
<template>
|
||||
<select
|
||||
:value="modelValue"
|
||||
class="select select-bordered select-sm w-full max-w-xs"
|
||||
@change="$emit('update:modelValue', ($event.target as HTMLSelectElement).value)"
|
||||
>
|
||||
<option
|
||||
v-for="filter in filters"
|
||||
:key="filter.id"
|
||||
:value="filter.id"
|
||||
>
|
||||
{{ filter.label }}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
interface Filter {
|
||||
id: string
|
||||
label: string
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
filters: Filter[]
|
||||
modelValue: string
|
||||
}>()
|
||||
|
||||
defineEmits<{
|
||||
'update:modelValue': [value: string]
|
||||
}>()
|
||||
</script>
|
||||
Reference in New Issue
Block a user