From a73a801a1df24fe7d02ada5b7cc44897825d6d13 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Sat, 7 Feb 2026 13:56:36 +0700 Subject: [PATCH] Make pins explicit and selection open info --- app/components/catalog/InfoPanel.vue | 37 ++++++++++++++++------- app/components/catalog/SelectionPanel.vue | 15 +++++---- app/composables/useCatalogSearch.ts | 13 ++++++-- app/pages/catalog/index.vue | 32 +++++++++++++++++--- 4 files changed, 72 insertions(+), 25 deletions(-) diff --git a/app/components/catalog/InfoPanel.vue b/app/components/catalog/InfoPanel.vue index 42c12e0..386c1bc 100644 --- a/app/components/catalog/InfoPanel.vue +++ b/app/components/catalog/InfoPanel.vue @@ -12,9 +12,20 @@

{{ entityName }}

- +
+ + +
@@ -123,11 +134,12 @@ @select="onProductSelect(product)" /> @@ -197,11 +209,12 @@ @select="onSupplierSelect(supplier)" /> @@ -242,11 +255,12 @@ @select="onHubSelect(hub)" /> @@ -274,11 +288,12 @@ @select="onHubSelect(hub)" /> diff --git a/app/components/catalog/SelectionPanel.vue b/app/components/catalog/SelectionPanel.vue index eb855dd..651931d 100644 --- a/app/components/catalog/SelectionPanel.vue +++ b/app/components/catalog/SelectionPanel.vue @@ -38,11 +38,12 @@ @select="onSelect(item)" /> @@ -62,11 +63,12 @@ @select="onSelect(item)" /> @@ -86,11 +88,12 @@ @select="onSelect(item)" /> diff --git a/app/composables/useCatalogSearch.ts b/app/composables/useCatalogSearch.ts index b9ceedc..327167e 100644 --- a/app/composables/useCatalogSearch.ts +++ b/app/composables/useCatalogSearch.ts @@ -94,7 +94,8 @@ export function useCatalogSearch() { }) // Filter by bounds checkbox state from URL - const filterByBounds = computed(() => route.query.bounds !== undefined) + // Use explicit flag so bounds don't auto-enable filtering. + const filterByBounds = computed(() => route.query.boundsFilter === '1') // Get label for a filter (from cache or fallback to ID) const getLabel = (type: string, id: string | undefined): string | null => { @@ -261,7 +262,7 @@ export function useCatalogSearch() { const setBoundsInUrl = (bounds: { west: number; south: number; east: number; north: number } | null) => { if (bounds) { const boundsStr = `${bounds.west.toFixed(4)},${bounds.south.toFixed(4)},${bounds.east.toFixed(4)},${bounds.north.toFixed(4)}` - updateQuery({ bounds: boundsStr }) + updateQuery({ bounds: boundsStr, boundsFilter: '1' }) } else { updateQuery({ bounds: null }) } @@ -269,7 +270,12 @@ export function useCatalogSearch() { // Clear bounds from URL const clearBoundsFromUrl = () => { - updateQuery({ bounds: null }) + updateQuery({ bounds: null, boundsFilter: null }) + } + + // Explicitly enable/disable bounds filter flag in URL + const setBoundsFilterEnabled = (enabled: boolean) => { + updateQuery({ boundsFilter: enabled ? '1' : null }) } const openInfo = (type: InfoEntityType, uuid: string) => { @@ -427,6 +433,7 @@ export function useCatalogSearch() { setQuantity, setBoundsInUrl, clearBoundsFromUrl, + setBoundsFilterEnabled, openInfo, closeInfo, setInfoTab, diff --git a/app/pages/catalog/index.vue b/app/pages/catalog/index.vue index 2cd346c..8366f67 100644 --- a/app/pages/catalog/index.vue +++ b/app/pages/catalog/index.vue @@ -25,7 +25,7 @@ :cluster-supplier-uuid="clusterSupplierUuid" @select="onMapSelect" @bounds-change="onBoundsChange" - @update:filter-by-bounds="$event ? setBoundsInUrl(currentMapBounds) : clearBoundsFromUrl()" + @update:filter-by-bounds="onToggleBoundsFilter" >