Simplify catalog UI - remove chips, add drawer for list
All checks were successful
Build Docker Image / build (push) Successful in 3m59s

- Remove product/hub chips from QuoteForm.vue (duplicate of toggle)
- Add drawer state to useCatalogSearch.ts (isDrawerOpen, selectDrawerItem, applyDrawerFilter)
- Convert SelectionPanel to drawer with header, scrollable content, and footer
- Add "Список" button to CatalogPage.vue to open drawer
- Add "Применить фильтр" button in drawer footer
- Add slide animations for drawer (left on desktop, up on mobile)
- Update translations: catalog.list, catalog.applyFilter
This commit is contained in:
Ruslan Bakiev
2026-01-26 14:36:42 +07:00
parent 65b07271d9
commit 0efc4eddfd
6 changed files with 233 additions and 168 deletions

View File

@@ -2,64 +2,6 @@
<div class="flex flex-col gap-4">
<h3 class="font-semibold text-lg">{{ $t('catalog.quote.title') }}</h3>
<!-- Product chip -->
<div class="form-control">
<label class="label py-1">
<span class="label-text text-xs text-base-content/70">{{ $t('catalog.filters.product') }}</span>
</label>
<button
v-if="productLabel"
class="btn btn-outline btn-sm justify-start gap-2"
@click="emit('edit-filter', 'product')"
>
<Icon name="lucide:package" size="16" />
<span class="flex-1 text-left truncate">{{ productLabel }}</span>
<span
class="btn btn-ghost btn-xs btn-circle"
@click.stop="emit('remove-filter', 'product')"
>
<Icon name="lucide:x" size="14" />
</span>
</button>
<button
v-else
class="btn btn-ghost btn-sm justify-start gap-2 border border-dashed border-base-content/30"
@click="emit('edit-filter', 'product')"
>
<Icon name="lucide:plus" size="16" class="text-base-content/50" />
<span class="text-base-content/50">{{ $t('catalog.quote.selectProduct') }}</span>
</button>
</div>
<!-- Hub chip -->
<div class="form-control">
<label class="label py-1">
<span class="label-text text-xs text-base-content/70">{{ $t('catalog.filters.hub') }}</span>
</label>
<button
v-if="hubLabel"
class="btn btn-outline btn-sm justify-start gap-2"
@click="emit('edit-filter', 'hub')"
>
<Icon name="lucide:map-pin" size="16" />
<span class="flex-1 text-left truncate">{{ hubLabel }}</span>
<span
class="btn btn-ghost btn-xs btn-circle"
@click.stop="emit('remove-filter', 'hub')"
>
<Icon name="lucide:x" size="14" />
</span>
</button>
<button
v-else
class="btn btn-ghost btn-sm justify-start gap-2 border border-dashed border-base-content/30"
@click="emit('edit-filter', 'hub')"
>
<Icon name="lucide:plus" size="16" class="text-base-content/50" />
<span class="text-base-content/50">{{ $t('catalog.quote.selectHub') }}</span>
</button>
</div>
<!-- Quantity input -->
<div class="form-control">
<label class="label py-1">