{{ product?.name }}
@@ -130,6 +128,48 @@ const supplierId = computed(() => routeRef.params.supplierId as string)
const productId = computed(() => routeRef.params.productId as string)
const hubId = computed(() => routeRef.params.hubId as string)
+// Navigation filters for search bar badges
+const navigationFilters = computed(() => {
+ const filters: Array<{ id: string; label: string; key: string }> = []
+
+ if (supplier.value?.name) {
+ filters.push({
+ id: 'supplier',
+ key: 'Поставщик',
+ label: supplier.value.name
+ })
+ }
+
+ if (product.value?.name) {
+ filters.push({
+ id: 'product',
+ key: 'Товар',
+ label: product.value.name
+ })
+ }
+
+ if (hub.value?.name) {
+ filters.push({
+ id: 'hub',
+ key: 'Хаб',
+ label: hub.value.name
+ })
+ }
+
+ return filters
+})
+
+// Handle removing navigation filter (navigate back)
+const handleRemoveFilter = (filterId: string) => {
+ if (filterId === 'hub') {
+ navigateTo(localePath(`/catalog/suppliers/${supplierId.value}/${productId.value}`))
+ } else if (filterId === 'product') {
+ navigateTo(localePath(`/catalog/suppliers/${supplierId.value}`))
+ } else if (filterId === 'supplier') {
+ navigateTo(localePath('/catalog/suppliers'))
+ }
+}
+
// Map items - show source and destination
const routePoints = computed(() => {
const points: Array<{ uuid: string; name: string; latitude: number; longitude: number }> = []
diff --git a/app/pages/catalog/suppliers/[supplierId]/[productId]/index.vue b/app/pages/catalog/suppliers/[supplierId]/[productId]/index.vue
index 2f3d409..f7f768a 100644
--- a/app/pages/catalog/suppliers/[supplierId]/[productId]/index.vue
+++ b/app/pages/catalog/suppliers/[supplierId]/[productId]/index.vue
@@ -13,8 +13,10 @@
@@ -35,14 +37,6 @@
-
-
-
{{ product?.name }}
@@ -116,6 +110,38 @@ const hoveredHubId = ref
()
const supplierId = computed(() => routeRef.params.supplierId as string)
const productId = computed(() => routeRef.params.productId as string)
+// Navigation filters for search bar badges
+const navigationFilters = computed(() => {
+ const filters: Array<{ id: string; label: string; key: string }> = []
+
+ if (supplier.value?.name) {
+ filters.push({
+ id: 'supplier',
+ key: 'Поставщик',
+ label: supplier.value.name
+ })
+ }
+
+ if (product.value?.name) {
+ filters.push({
+ id: 'product',
+ key: 'Товар',
+ label: product.value.name
+ })
+ }
+
+ return filters
+})
+
+// Handle removing navigation filter (navigate back)
+const handleRemoveFilter = (filterId: string) => {
+ if (filterId === 'product') {
+ navigateTo(localePath(`/catalog/suppliers/${supplierId.value}`))
+ } else if (filterId === 'supplier') {
+ navigateTo(localePath('/catalog/suppliers'))
+ }
+}
+
// Search
const searchQuery = ref('')
diff --git a/app/pages/catalog/suppliers/[supplierId]/index.vue b/app/pages/catalog/suppliers/[supplierId]/index.vue
index 6998272..d954487 100644
--- a/app/pages/catalog/suppliers/[supplierId]/index.vue
+++ b/app/pages/catalog/suppliers/[supplierId]/index.vue
@@ -11,8 +11,10 @@
@@ -33,9 +35,6 @@
-
-
-
@@ -100,6 +99,28 @@ const offers = ref
([])
const supplierId = computed(() => route.params.supplierId as string)
+// Navigation filters for search bar badges
+const navigationFilters = computed(() => {
+ const filters: Array<{ id: string; label: string; key: string }> = []
+
+ if (supplier.value?.name) {
+ filters.push({
+ id: 'supplier',
+ key: 'Поставщик',
+ label: supplier.value.name
+ })
+ }
+
+ return filters
+})
+
+// Handle removing navigation filter (navigate back)
+const handleRemoveFilter = (filterId: string) => {
+ if (filterId === 'supplier') {
+ navigateTo(localePath('/catalog/suppliers'))
+ }
+}
+
// Search
const searchQuery = ref('')