Improve selection panel and hub card compass
All checks were successful
Build Docker Image / build (push) Successful in 4m44s

This commit is contained in:
Ruslan Bakiev
2026-02-06 15:21:24 +07:00
parent fa0465fabb
commit f0c687c3ff
4 changed files with 121 additions and 35 deletions

View File

@@ -206,6 +206,7 @@
v-for="(hub, index) in railHubs"
:key="hub.uuid ?? index"
:hub="hub"
:origin="originCoords"
selectable
@select="onHubSelect(hub)"
/>
@@ -226,6 +227,7 @@
v-for="(hub, index) in seaHubs"
:key="hub.uuid ?? index"
:hub="hub"
:origin="originCoords"
selectable
@select="onHubSelect(hub)"
/>
@@ -306,6 +308,13 @@ const entityLocation = computed(() => {
return parts.length > 0 ? parts.join(', ') : null
})
const originCoords = computed(() => {
const lat = props.entity?.locationLatitude ?? props.entity?.latitude
const lon = props.entity?.locationLongitude ?? props.entity?.longitude
if (lat == null || lon == null) return null
return { latitude: Number(lat), longitude: Number(lon) }
})
// Products section title based on entity type
const productsSectionTitle = computed(() => {
return props.entityType === 'hub'