Files
webapp/app/components/catalog/RouteStepper.vue
Ruslan Bakiev 0337cebc63
All checks were successful
Build Docker Image / build (push) Successful in 4m42s
Simplify OfferResultCard and use daisyUI Steps
- Remove sourceName, latitude, longitude props from OfferResultCard
- Remove LocationMiniMap component (not needed, main map is on the side)
- Convert RouteStepper to use daisyUI steps-horizontal
- Update hub page and CalcResultContent to remove unused props
2026-01-15 00:33:17 +07:00

42 lines
813 B
Vue

<template>
<ul class="steps steps-horizontal text-xs w-full">
<li
v-for="(stage, index) in stages"
:key="index"
class="step step-primary"
:data-content="getTransportIcon(stage.transportType)"
>
{{ formatDistance(stage.distanceKm) }} км
</li>
</ul>
</template>
<script setup lang="ts">
export interface RouteStage {
transportType?: string | null
distanceKm?: number | null
}
defineProps<{
stages: RouteStage[]
}>()
const getTransportIcon = (type?: string | null) => {
switch (type) {
case 'rail':
return '🚂'
case 'sea':
return '🚢'
case 'road':
case 'auto':
default:
return '🚛'
}
}
const formatDistance = (km?: number | null) => {
if (!km) return '0'
return Math.round(km).toLocaleString()
}
</script>