Pridana moznost zobrazeni planu v detailu letu
This commit is contained in:
@@ -10,7 +10,7 @@ export default {
|
||||
|
||||
<script setup>
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {computed, onMounted, watch} from "vue";
|
||||
import {onMounted} from "vue";
|
||||
import FlightDetailSkeleton from "components/flights/skeletons/FlightDetailSkeleton.vue";
|
||||
import {flightName} from "src/composables/flight";
|
||||
import {useAppStore} from "stores/App";
|
||||
@@ -30,7 +30,7 @@ import CopyLinkButton from "components/inputs/CopyLinkButton.vue";
|
||||
import {TOGGLE_FLIGHT_PUBLISH} from "src/graphql/mutations/flight";
|
||||
import {useAirspacesStore} from "stores/Airspaces";
|
||||
import {useAirportsStore} from "stores/Airports";
|
||||
import MapWrapper from "components/map/MapWrapper.vue";
|
||||
import {useFlightPlansStore} from "stores/FlightPlans";
|
||||
|
||||
const flightId = parseInt(useRoute().params.id);
|
||||
const loggedUser = storeToRefs(useLoggedUserStore()).user;
|
||||
@@ -57,9 +57,15 @@ const handleDeleteAndRedirect = () => {
|
||||
|
||||
const {airspaces} = storeToRefs(useAirspacesStore());
|
||||
const {airports} = storeToRefs(useAirportsStore());
|
||||
const {flightPlan} = storeToRefs(useFlightPlansStore());
|
||||
|
||||
onMounted(() => {
|
||||
useAirspacesStore().fetch();
|
||||
useAirportsStore().fetch();
|
||||
|
||||
if (flight.value.flightPlanId) {
|
||||
useFlightPlansStore().fetchDetail(flight.value.flightPlanId);
|
||||
}
|
||||
});
|
||||
|
||||
const togglePublicVisibility = (variables) => toggleVisibility({
|
||||
@@ -156,6 +162,7 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
||||
:show-info-window="true"
|
||||
:show-layer-controls="true"
|
||||
:flight="flight"
|
||||
:flight-plan="flightPlan"
|
||||
:photos="flight.photos"
|
||||
/>
|
||||
</q-no-ssr>
|
||||
|
||||
Reference in New Issue
Block a user