fix(catalog): remove hover/select animations from intermediate pages
All checks were successful
Build Docker Image / build (push) Successful in 3m42s
All checks were successful
Build Docker Image / build (push) Successful in 3m42s
Animation on map only needed on final pages (routes/sources). Intermediate pages now navigate directly on card click. Files changed: - hubs/index.vue - removed hover/select - suppliers/index.vue - removed hover/select - suppliers/[]/[]/index.vue - removed hover - offers/index.vue - removed hover - offers/[]/index.vue - removed hover
This commit is contained in:
@@ -7,11 +7,7 @@
|
||||
use-server-clustering
|
||||
map-id="hubs-map"
|
||||
point-color="#10b981"
|
||||
:selected-id="selectedHubId"
|
||||
:hovered-id="hoveredHubId"
|
||||
:total-count="total"
|
||||
@select="onSelectHub"
|
||||
@update:hovered-id="hoveredHubId = $event"
|
||||
>
|
||||
<template #searchBar="{ displayedCount, totalCount }">
|
||||
<CatalogSearchBar
|
||||
@@ -104,10 +100,6 @@ const {
|
||||
init
|
||||
} = useCatalogHubs()
|
||||
|
||||
// Selected/hovered hub for map highlighting
|
||||
const selectedHubId = ref<string>()
|
||||
const hoveredHubId = ref<string>()
|
||||
|
||||
// Search bar
|
||||
const searchQuery = ref('')
|
||||
|
||||
@@ -171,10 +163,6 @@ const onSearch = () => {
|
||||
// TODO: Implement search by hub name
|
||||
}
|
||||
|
||||
const onSelectHub = (hub: any) => {
|
||||
selectedHubId.value = hub.uuid
|
||||
}
|
||||
|
||||
await init()
|
||||
|
||||
useHead(() => ({
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
cluster-node-type="logistics"
|
||||
map-id="offers-product-hubs-map"
|
||||
point-color="#10b981"
|
||||
:hovered-id="hoveredHubId"
|
||||
@update:hovered-id="hoveredHubId = $event"
|
||||
@select="onSelectHub"
|
||||
>
|
||||
<template #searchBar="{ displayedCount, totalCount }">
|
||||
@@ -57,7 +55,6 @@ const { t } = useI18n()
|
||||
const isLoading = ref(true)
|
||||
const product = ref<{ uuid: string; name: string } | null>(null)
|
||||
const hubs = ref<Array<{ uuid: string; name: string; latitude?: number; longitude?: number; country?: string; countryCode?: string }>>([])
|
||||
const hoveredHubId = ref<string>()
|
||||
|
||||
const productId = computed(() => route.params.productId as string)
|
||||
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
cluster-node-type="offer"
|
||||
map-id="offers-products-map"
|
||||
point-color="#22c55e"
|
||||
:hovered-id="hoveredProductId"
|
||||
@update:hovered-id="hoveredProductId = $event"
|
||||
>
|
||||
<template #searchBar>
|
||||
<CatalogSearchBar
|
||||
@@ -46,9 +44,6 @@ const { t } = useI18n()
|
||||
|
||||
const { items: products, isLoading, init } = useCatalogProducts()
|
||||
|
||||
// Hovered product for map sync
|
||||
const hoveredProductId = ref<string>()
|
||||
|
||||
// Search
|
||||
const searchQuery = ref('')
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
with-map
|
||||
map-id="supplier-product-hubs-map"
|
||||
point-color="#10b981"
|
||||
:hovered-id="hoveredHubId"
|
||||
@update:hovered-id="hoveredHubId = $event"
|
||||
@select="onSelectHub"
|
||||
>
|
||||
<template #searchBar="{ displayedCount, totalCount }">
|
||||
@@ -74,7 +72,6 @@ const supplier = ref<any>(null)
|
||||
const product = ref<{ uuid: string; name: string } | null>(null)
|
||||
const sourceLocation = ref<{ uuid: string; name: string } | null>(null)
|
||||
const hubs = ref<Array<{ uuid: string; name: string; latitude?: number; longitude?: number; country?: string; countryCode?: string }>>([])
|
||||
const hoveredHubId = ref<string>()
|
||||
|
||||
const supplierId = computed(() => routeRef.params.supplierId as string)
|
||||
const productId = computed(() => routeRef.params.productId as string)
|
||||
|
||||
@@ -6,11 +6,7 @@
|
||||
with-map
|
||||
map-id="suppliers-map"
|
||||
point-color="#3b82f6"
|
||||
:selected-id="selectedSupplierId"
|
||||
:hovered-id="hoveredSupplierId"
|
||||
:total-count="total"
|
||||
@select="onSelectSupplier"
|
||||
@update:hovered-id="hoveredSupplierId = $event"
|
||||
>
|
||||
<template #searchBar="{ displayedCount, totalCount }">
|
||||
<CatalogSearchBar
|
||||
@@ -68,10 +64,6 @@ const {
|
||||
init
|
||||
} = useCatalogSuppliers()
|
||||
|
||||
// Selected/hovered supplier for map highlighting
|
||||
const selectedSupplierId = ref<string>()
|
||||
const hoveredSupplierId = ref<string>()
|
||||
|
||||
// Search bar
|
||||
const searchQuery = ref('')
|
||||
|
||||
@@ -111,10 +103,6 @@ const onSearch = () => {
|
||||
// TODO: Implement search
|
||||
}
|
||||
|
||||
const onSelectSupplier = (supplier: any) => {
|
||||
selectedSupplierId.value = supplier.uuid || supplier.teamUuid
|
||||
}
|
||||
|
||||
await init()
|
||||
|
||||
useHead(() => ({
|
||||
|
||||
Reference in New Issue
Block a user