diff --git a/src/pages/public/pilotProfile/FlightPlanDetail.vue b/src/pages/public/pilotProfile/FlightPlanDetail.vue index 6ca6b00..5e0287d 100644 --- a/src/pages/public/pilotProfile/FlightPlanDetail.vue +++ b/src/pages/public/pilotProfile/FlightPlanDetail.vue @@ -20,7 +20,7 @@ import {useAirspacesStore} from "stores/Airspaces"; import {usePointsOfInterestStore} from "stores/PointsOfInterest"; import {useAirportsStore} from "stores/Airports"; import {formatDatetime, minutesToHumanReadable} from "src/composables/datetimeUtils"; -import {useFlightPlanCalculations} from "src/composables/flightPlan"; +import {useFlightPlanCalculations, useFlightPlanUtils} from "src/composables/flightPlan"; import FlightPlanRouteTable from "components/flightPlans/FlightPlanRouteTable.vue"; import {useMeta} from "quasar"; import {metaData} from "src/composables/meta"; @@ -56,6 +56,13 @@ const {pointsOfInterest} = storeToRefs(usePointsOfInterestStore()); const {airspaces: airspacesData, areAirspacesLoading: isQueryRunning} = storeToRefs(useAirspacesStore()) const {airports} = storeToRefs(useAirportsStore()); +const {getMarkersFrom} = useFlightPlanUtils(); + +const usedPointsOfInterest = computed(() => { + const poisInTrackIds = getMarkersFrom(flightPlan.value).filter(m => !!m.pointOfInterestId).map(poi => poi.id); + return pointsOfInterest.value.filter(poi => poisInTrackIds.includes(poi.id)) +}); + const openedTab = ref("map"); const {getTotalDistance, getTotalDuration} = useFlightPlanCalculations(); @@ -75,7 +82,7 @@ const showInfoCard = computed(() => flightPlan.value.aircraft || flightPlan.valu