Pridana moznost zobrazeni planu v detailu letu
This commit is contained in:
@@ -26,6 +26,7 @@ import {computed, onMounted} from "vue";
|
||||
import {publicFlightBreadcrumbs} from "src/composables/breadcrumbs";
|
||||
import {useAirspacesStore} from "stores/Airspaces";
|
||||
import {useAirportsStore} from "stores/Airports";
|
||||
import {useFlightPlansStore} from "stores/FlightPlans";
|
||||
|
||||
const {isQueryRunning, flight} = storeToRefs(useFlightsStore());
|
||||
|
||||
@@ -39,12 +40,16 @@ const props = defineProps({
|
||||
onMounted(() => {
|
||||
usePhotosStore().fetchPublic({flightId: flight.value.id});
|
||||
useAirspacesStore().fetch();
|
||||
useAirportsStore().fetch();
|
||||
useAirportsStore().fetch();
|
||||
|
||||
if (flight.value.flightPlanId) {
|
||||
useFlightPlansStore().fetchPublicDetail({username: props.pilot.publicUsername, id: flight.value.flightPlanId});
|
||||
}
|
||||
})
|
||||
const {isQueryRunning: arePhotosLoading, photos: flightPhotos} = storeToRefs(usePhotosStore());
|
||||
const {airspaces} = storeToRefs(useAirspacesStore());
|
||||
const {airports} = storeToRefs(useAirportsStore());
|
||||
const {flightPlan} = storeToRefs(useFlightPlansStore());
|
||||
|
||||
const flightNameFormatted = flightName(flight.value);
|
||||
const event = computed(() => flight.value.event);
|
||||
@@ -87,10 +92,11 @@ useMeta(() => metaData({
|
||||
<q-inner-loading v-if="arePhotosLoading"/>
|
||||
<PhotoGallery :photos="flightPhotos" v-else-if="!arePhotosLoading && flightPhotos.length > 0"/>
|
||||
<FlightTrackMap
|
||||
:airspaces-data="airspaces"
|
||||
:airports="airports"
|
||||
:key="flight.id"
|
||||
:airspaces-data="airspaces"
|
||||
:airports="airports"
|
||||
:key="flight.id"
|
||||
:flight="flight"
|
||||
:flight-plan="flightPlan"
|
||||
:show-info-window="true"
|
||||
:showLayerControls="false"
|
||||
:photos="flightPhotos"/>
|
||||
|
||||
Reference in New Issue
Block a user