Vicemene funkcni mapova cast planovace

This commit is contained in:
Michal Kváček
2024-04-29 06:45:29 +02:00
parent bc0b5e2f15
commit 0760e6fb1c
9 changed files with 111 additions and 70 deletions
@@ -42,8 +42,15 @@ const {getIcon} = useFlightPlanUtils();
const {editableNameTypes} = useFlightPlanObjects();
const allPlacesOptions = computed(() => {
const reportingPoints = props.airports.map(a => a.reportingPoints.map(r => ({...r, airport: a}))).flat()
return [
...props.pointsOfInterest.map(poi => ({...poi, type: "poi"})),
...reportingPoints.map(r => ({
...r,
name: `${r.airport.icaoCode}:${r.name}`,
type: "reportingPoint"
})),
...props.airports.map(airport => ({
...airport,
name: `${airport.icaoCode} - ${airport.name}`,