From 13f60bd022247556e3368846426859b2cb2d5407 Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Thu, 8 Jan 2026 14:22:37 +0700 Subject: [PATCH] feat: show transport type on routes + unify map height MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add transportType display (🚂 ЖД / 🚛 Авто) in RouteStagesList - Pass transportType from CalcResultContent to RouteStagesList - Unify map height in CatalogPage for orders/addresses pages --- app/components/CalcResultContent.vue | 3 ++- app/components/RouteStagesList.vue | 10 ++++++++-- app/components/page/CatalogPage.vue | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/app/components/CalcResultContent.vue b/app/components/CalcResultContent.vue index badc316..db83a5e 100644 --- a/app/components/CalcResultContent.vue +++ b/app/components/CalcResultContent.vue @@ -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 })) } diff --git a/app/components/RouteStagesList.vue b/app/components/RouteStagesList.vue index 2f151e3..f0ee282 100644 --- a/app/components/RouteStagesList.vue +++ b/app/components/RouteStagesList.vue @@ -22,8 +22,13 @@ -
- {{ formatDistance(stage.distanceKm) }} км +
+ + {{ stage.transportType === 'rail' ? '🚂 ЖД' : '🚛 Авто' }} + + + {{ formatDistance(stage.distanceKm) }} км +
@@ -40,6 +45,7 @@ export type RouteStageItem = { label?: string | null distanceKm?: number | null durationSeconds?: number | null + transportType?: string | null meta?: string[] } diff --git a/app/components/page/CatalogPage.vue b/app/components/page/CatalogPage.vue index bd13df2..226e322 100644 --- a/app/components/page/CatalogPage.vue +++ b/app/components/page/CatalogPage.vue @@ -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]