Add hasSubNav prop for map positioning (3 vs 2 nav levels)
All checks were successful
Build Docker Image / build (push) Successful in 3m58s

This commit is contained in:
Ruslan Bakiev
2026-01-08 13:11:13 +07:00
parent 53904ead05
commit 675ccc2064
4 changed files with 11 additions and 2 deletions

View File

@@ -47,7 +47,7 @@
<!-- Right: Map (fixed position) -->
<div class="w-3/5 relative">
<div class="fixed top-32 right-6 w-[calc(60%-3rem)] h-[calc(100vh-9rem)] rounded-lg overflow-hidden">
<div class="fixed right-6 w-[calc(60%-3rem)] rounded-lg overflow-hidden" :class="[mapTopClass, mapHeightClass]">
<ClientOnly>
<CatalogMap
ref="mapRef"
@@ -172,13 +172,19 @@ const props = withDefaults(defineProps<{
pointColor?: string
selectedId?: string
hoveredId?: string
hasSubNav?: boolean
}>(), {
loading: false,
withMap: true,
mapId: 'catalog-map',
pointColor: '#3b82f6'
pointColor: '#3b82f6',
hasSubNav: true
})
// Map positioning based on navigation height
const mapTopClass = computed(() => props.hasSubNav ? 'top-40' : 'top-32')
const mapHeightClass = computed(() => props.hasSubNav ? 'h-[calc(100vh-11rem)]' : 'h-[calc(100vh-9rem)]')
const emit = defineEmits<{
'select': [item: MapItem]
'update:selectedId': [uuid: string]

View File

@@ -6,6 +6,7 @@
point-color="#10b981"
:selected-id="selectedAddressId"
v-model:hovered-id="hoveredAddressId"
:has-sub-nav="false"
@select="onSelectAddress"
>
<template #header>

View File

@@ -6,6 +6,7 @@
point-color="#6366f1"
:selected-id="selectedOrderId"
v-model:hovered-id="hoveredOrderId"
:has-sub-nav="false"
@select="onSelectOrder"
>
<template #filters>

View File

@@ -6,6 +6,7 @@
point-color="#10b981"
:selected-id="selectedHubId"
v-model:hovered-id="hoveredHubId"
:has-sub-nav="false"
@select="selectHub"
>
<template #header>