Commit po dlohe dobe
This commit is contained in:
@@ -3,7 +3,7 @@ import {commonProps} from "src/composables/inputs";
|
|||||||
import DatetimePicker from "components/inputs/DatetimePicker.vue";
|
import DatetimePicker from "components/inputs/DatetimePicker.vue";
|
||||||
import ComboboxInput from "components/inputs/ComboboxInput.vue";
|
import ComboboxInput from "components/inputs/ComboboxInput.vue";
|
||||||
import FormWrapper from "components/FormWrapper.vue";
|
import FormWrapper from "components/FormWrapper.vue";
|
||||||
import {reactive} from "vue";
|
import {computed, reactive} from "vue";
|
||||||
import CopyLinkButton from "components/inputs/CopyLinkButton.vue";
|
import CopyLinkButton from "components/inputs/CopyLinkButton.vue";
|
||||||
import {useLoggedUserStore} from "stores/LoggedUser";
|
import {useLoggedUserStore} from "stores/LoggedUser";
|
||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
@@ -22,6 +22,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const aircrafts = computed(() => props.aircrafts.map(a => ({id: a.id, name: a.callSign})));
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
name: props.flightPlan.name || null,
|
name: props.flightPlan.name || null,
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<script setup>
|
||||||
|
import {useAirportsStore} from "stores/Airports";
|
||||||
|
import ComboboxInput from "components/inputs/ComboboxInput.vue";
|
||||||
|
import {ref} from "vue";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: {
|
||||||
|
type: [Object, Array]
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const model = ref("");
|
||||||
|
|
||||||
|
const options = useAirportsStore().fetch();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<ComboboxInput :options="options" v-model="model"
|
||||||
|
</template>
|
||||||
@@ -11,6 +11,7 @@ import {useBasicPhotoOperations} from "src/composables/photos/basicOperations";
|
|||||||
import {storeToRefs} from "pinia";
|
import {storeToRefs} from "pinia";
|
||||||
import {useAircraftsStore} from "stores/Aircrafts";
|
import {useAircraftsStore} from "stores/Aircrafts";
|
||||||
import {usePhotosStore} from "stores/Photos";
|
import {usePhotosStore} from "stores/Photos";
|
||||||
|
import {useQuasar} from "quasar";
|
||||||
|
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -32,6 +33,7 @@ const {photos, isQueryRunning: photosLoading} = storeToRefs(usePhotosStore());
|
|||||||
|
|
||||||
const isLoading = computed(() => aircraftsLoading.value || poisLoading.value || photosLoading.value);
|
const isLoading = computed(() => aircraftsLoading.value || poisLoading.value || photosLoading.value);
|
||||||
|
|
||||||
|
const $q = useQuasar();
|
||||||
const setTitlePhoto = (photo) => {
|
const setTitlePhoto = (photo) => {
|
||||||
useFlightsStore().update(props.flight.id, {titlePhotoId: photo.id}).then(f => {
|
useFlightsStore().update(props.flight.id, {titlePhotoId: photo.id}).then(f => {
|
||||||
$q.notify(successObject("Úvodní fotografie úspěšně nastavena"));
|
$q.notify(successObject("Úvodní fotografie úspěšně nastavena"));
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ const createNewFlightFromPlan = (formData) => {
|
|||||||
V plánu nemáš žádné letiště vzletu nebo přistání. Pro import letu musíš nahrát trasu.
|
V plánu nemáš žádné letiště vzletu nebo přistání. Pro import letu musíš nahrát trasu.
|
||||||
</BasicInfoBanner>
|
</BasicInfoBanner>
|
||||||
<FlightFromPlanForm
|
<FlightFromPlanForm
|
||||||
|
v-bind="$attrs"
|
||||||
:flight-plan="flightPlan"
|
:flight-plan="flightPlan"
|
||||||
@save="createNewFlightFromPlan"
|
@save="createNewFlightFromPlan"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ const {aircrafts} = storeToRefs(useAircraftsStore());
|
|||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const handleFlightPlanInfoSave = (formData) => {
|
const handleFlightPlanInfoSave = (formData) => {
|
||||||
useFlightPlansStore().update(props.flightPlan.value.id, formData).then(() => {
|
useFlightPlansStore().update(props.flightPlan.id, formData).then(() => {
|
||||||
$q.notify(successObject("Informace úspěšně uloženy"));
|
$q.notify(successObject("Informace úspěšně uloženy"));
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,10 +11,9 @@ const props = defineProps({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<BasicInfoBanner>
|
<BasicInfoBanner>
|
||||||
Pozor, informace o počasí mají jen informativní charakter a mohou být nepřesné!
|
Pozor, informace o počasí mají jen informativní charakter a mohou být nepřesné!
|
||||||
</BasicInfoBanner>
|
</BasicInfoBanner>
|
||||||
|
|
||||||
<FlightPlanWeatherInfo :flight-plan="flightPlan"/>
|
<FlightPlanWeatherInfo v-bind="$attrs" :flight-plan="flightPlan"/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user