From 0a79b90d1c44535d8c4bc772ffbde58a20d3c2de Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Mon, 19 Jan 2026 11:09:58 +0700 Subject: [PATCH] Replace breadcrumbs with key-value badges in search bar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add key property to FilterOption interface in CatalogSearchBar - Display badges in "Key: Value" format (e.g., "Поставщик: Name") - Remove SuppliersBreadcrumbs from supplier catalog pages - Add navigationFilters computed with supplier/product/hub badges - Add handleRemoveFilter to navigate back when badge is clicked --- app/components/catalog/CatalogSearchBar.vue | 9 ++- .../[supplierId]/[productId]/[hubId].vue | 60 +++++++++++++++---- .../[supplierId]/[productId]/index.vue | 42 ++++++++++--- .../catalog/suppliers/[supplierId]/index.vue | 27 ++++++++- 4 files changed, 116 insertions(+), 22 deletions(-) diff --git a/app/components/catalog/CatalogSearchBar.vue b/app/components/catalog/CatalogSearchBar.vue index 9ebcc40..cb203ec 100644 --- a/app/components/catalog/CatalogSearchBar.vue +++ b/app/components/catalog/CatalogSearchBar.vue @@ -15,7 +15,13 @@ class="badge badge-sm badge-primary gap-1 cursor-pointer hover:badge-error transition-colors" @click="$emit('remove-filter', filter.id)" > - {{ filter.label }} + + @@ -96,6 +102,7 @@ interface FilterOption { id: string label: string + key?: string // Optional key for "Key: Value" format badges } interface SortOption { diff --git a/app/pages/catalog/suppliers/[supplierId]/[productId]/[hubId].vue b/app/pages/catalog/suppliers/[supplierId]/[productId]/[hubId].vue index b5d5699..3b3a74d 100644 --- a/app/pages/catalog/suppliers/[supplierId]/[productId]/[hubId].vue +++ b/app/pages/catalog/suppliers/[supplierId]/[productId]/[hubId].vue @@ -6,6 +6,14 @@ map-id="supplier-route-map" point-color="#10b981" > + +