feat: show transport type on routes + unify map height
All checks were successful
Build Docker Image / build (push) Successful in 4m33s

- Add transportType display (🚂 ЖД / 🚛 Авто) in RouteStagesList
- Pass transportType from CalcResultContent to RouteStagesList
- Unify map height in CatalogPage for orders/addresses pages
This commit is contained in:
Ruslan Bakiev
2026-01-08 14:22:37 +07:00
parent 821dd72809
commit 13f60bd022
3 changed files with 13 additions and 6 deletions

View File

@@ -221,7 +221,8 @@ const mapRouteStages = (route: RoutePathType): RouteStageItem[] => {
from: stage?.fromName || 'Начало',
to: stage?.toName || 'Конец',
distanceKm: stage?.distanceKm,
durationSeconds: stage?.travelTimeSeconds
durationSeconds: stage?.travelTimeSeconds,
transportType: stage?.transportType
}))
}

View File

@@ -22,8 +22,13 @@
</div>
</div>
<div v-if="stage.distanceKm" class="text-sm text-base-content/70 shrink-0">
<span>{{ formatDistance(stage.distanceKm) }} км</span>
<div class="flex items-center gap-2 shrink-0">
<span v-if="stage.transportType" class="badge badge-sm badge-outline">
{{ stage.transportType === 'rail' ? '🚂 ЖД' : '🚛 Авто' }}
</span>
<span v-if="stage.distanceKm" class="text-sm text-base-content/70">
{{ formatDistance(stage.distanceKm) }} км
</span>
</div>
</div>
</div>
@@ -40,6 +45,7 @@ export type RouteStageItem = {
label?: string | null
distanceKm?: number | null
durationSeconds?: number | null
transportType?: string | null
meta?: string[]
}

View File

@@ -181,9 +181,9 @@ const props = withDefaults(defineProps<{
hasSubNav: true
})
// Map positioning based on navigation height (no search bar on catalog pages now)
const mapTopClass = computed(() => props.hasSubNav ? 'top-32' : 'top-24')
const mapHeightClass = computed(() => props.hasSubNav ? 'h-[calc(100vh-9rem)]' : 'h-[calc(100vh-7rem)]')
// Map positioning - unified height for all pages with map
const mapTopClass = 'top-32'
const mapHeightClass = 'h-[calc(100vh-9rem)]'
const emit = defineEmits<{
'select': [item: MapItem]