Improve selection panel and hub card compass
All checks were successful
Build Docker Image / build (push) Successful in 4m44s
All checks were successful
Build Docker Image / build (push) Successful in 4m44s
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user