-
+
@@ -97,7 +112,7 @@
diff --git a/app/layouts/topnav.vue b/app/layouts/topnav.vue
index 00eba51..f43262d 100644
--- a/app/layouts/topnav.vue
+++ b/app/layouts/topnav.vue
@@ -21,7 +21,7 @@
:hub-label="hubLabel"
:quantity="quantity"
:can-search="canSearch"
- :show-mode-toggle="isCatalogSection"
+ :show-mode-toggle="true"
@toggle-theme="toggleTheme"
@set-catalog-mode="setCatalogMode"
@sign-out="onClickSignOut"
diff --git a/app/pages/catalog/index.vue b/app/pages/catalog/index.vue
index 8dc66c0..ce5c0a0 100644
--- a/app/pages/catalog/index.vue
+++ b/app/pages/catalog/index.vue
@@ -54,6 +54,7 @@ const {
hubId,
canSearch,
mapViewMode,
+ setMapViewMode,
entityColors,
selectItem,
cancelSelect,
@@ -73,11 +74,20 @@ const selectionLoading = computed(() => {
return false
})
-// Initialize data when selectMode changes
+// Initialize data and sync map view when selectMode changes
watch(selectMode, async (mode) => {
- if (mode === 'product') await initProducts()
- if (mode === 'hub') await initHubs()
- if (mode === 'supplier') await initSuppliers()
+ if (mode === 'product') {
+ await initProducts()
+ setMapViewMode('offers')
+ }
+ if (mode === 'hub') {
+ await initHubs()
+ setMapViewMode('hubs')
+ }
+ if (mode === 'supplier') {
+ await initSuppliers()
+ setMapViewMode('suppliers')
+ }
}, { immediate: true })
// Offers data for quote results