diff --git a/src/components/flights/form/FlightFormCopilot.vue b/src/components/flights/form/FlightFormCopilot.vue
index 5f7a0cc..e270ce5 100644
--- a/src/components/flights/form/FlightFormCopilot.vue
+++ b/src/components/flights/form/FlightFormCopilot.vue
@@ -19,42 +19,11 @@ const formData = reactive({
copilots: [],
})
-const solo = ref(false);
-watch(() => solo.value, (newVal) => {
- if (!newVal) {
- formData.copilots = [];
- }
-});
-
-watch(() => props.flight, (newVal) => {
- if (newVal) {
- formData.copilots = newVal.copilots.map(copilot => ({id: copilot.id, name: copilot.name}));
- solo.value = formData.copilots.length === 0;
- }
-}, {deep: true, immediate: true});
-
-
-
-
diff --git a/src/components/flights/form/FlightFormNotes.vue b/src/components/flights/form/FlightFormNotes.vue
index 80ab66f..f77d3a5 100644
--- a/src/components/flights/form/FlightFormNotes.vue
+++ b/src/components/flights/form/FlightFormNotes.vue
@@ -19,6 +19,10 @@ const props = defineProps({
type: Array,
required: false,
},
+ copilots: {
+ type: Array,
+ required: false,
+ },
isRequestPending: {
type: Boolean,
required: false,
@@ -32,7 +36,8 @@ const formData = reactive({
description: "",
debriefingNotes: "",
urlSlug: "",
- isPublic: null
+ isPublic: null,
+ copilots: []
})
@@ -48,6 +53,20 @@ watch(() => props.flight, (newVal) => {
}
}, {immediate: true});
+const solo = ref(false);
+watch(() => solo.value, (newVal) => {
+ if (!newVal) {
+ formData.copilots = [];
+ }
+});
+
+watch(() => props.flight, (newVal) => {
+ if (newVal) {
+ formData.copilots = newVal.copilots.map(copilot => ({id: copilot.id, name: copilot.name}));
+ solo.value = formData.copilots.length === 0;
+ }
+}, {deep: true, immediate: true});
+
const descriptionTab = ref("description");
@@ -67,6 +86,32 @@ const descriptionTab = ref("description");
+
+ Letel jsi
+
+
+
+
+
+
+
+
Popis
Debriefing (soukromé poznámky)
@@ -75,8 +120,8 @@ const descriptionTab = ref("description");
-
+
Debriefing by měl obsahovat minimálně následující body:
@@ -85,9 +130,7 @@ const descriptionTab = ref("description");
- Stav letadla: Funkčnost přístrojů, případné problémy.
- Bezpečnostní postupy: Dodržení bezpečnostních pravidel, řešení neočekávaných situací.
- Zpětná vazba: Pocity z letu, spokojenost pasažéra, návrhy na zlepšení.
- - Dokumentace: Zápis do deníku, technická kontrola, záznamy o počasí.
-
diff --git a/src/components/flights/form/FlightFormSteps.vue b/src/components/flights/form/FlightFormSteps.vue
index 0f5bec0..6f68f2a 100644
--- a/src/components/flights/form/FlightFormSteps.vue
+++ b/src/components/flights/form/FlightFormSteps.vue
@@ -25,12 +25,11 @@ onMounted(() => {
})
const steps = [
- {name: "basic", icon: "flight_takeoff", label: "Základní informace"},
- {name: "copilot", icon: "person_add", label: "Spolucestující"},
- {name: "track", icon: "route", label: "Trasa"},
- {name: "photos", icon: "add_a_photo", label: "Fotky"},
- {name: "notes", icon: "edit_note", label: "Poznámky"},
- {name: "plan", icon: "pin_drop", label: "Plán"},
+ {name: "editFlightBasic", icon: "flight_takeoff", label: "Základní informace"},
+ {name: "editFlightTrack", icon: "route", label: "Trasa"},
+ {name: "editFlightPhotos", icon: "add_a_photo", label: "Fotky"},
+ {name: "editFlightNotes", icon: "edit_note", label: "Poznámky"},
+ {name: "editFlightSetPlan", icon: "pin_drop", label: "Plán"},
];
const emit = defineEmits(["update:modelValue"])
@@ -38,14 +37,20 @@ watch(currentStep, (val) => emit("update:modelValue", val));
-
+
@@ -61,7 +66,6 @@ watch(currentStep, (val) => emit("update:modelValue", val));
active-color="primary"
class="q-mb-lg"
>
-
diff --git a/src/components/flights/skeletons/FlightEditBasicInfoSkeleton.vue b/src/components/flights/skeletons/FlightEditBasicInfoSkeleton.vue
new file mode 100644
index 0000000..703293c
--- /dev/null
+++ b/src/components/flights/skeletons/FlightEditBasicInfoSkeleton.vue
@@ -0,0 +1,23 @@
+`
+
+
+
+
+
+
diff --git a/src/components/flights/skeletons/FlightEditExtraInfoSkeleton.vue b/src/components/flights/skeletons/FlightEditExtraInfoSkeleton.vue
new file mode 100644
index 0000000..4083fb1
--- /dev/null
+++ b/src/components/flights/skeletons/FlightEditExtraInfoSkeleton.vue
@@ -0,0 +1,6 @@
+
+
+
+
+
+
diff --git a/src/components/flights/skeletons/FlightEditSkeleton.vue b/src/components/flights/skeletons/FlightEditSkeleton.vue
deleted file mode 100644
index 9c0cfcc..0000000
--- a/src/components/flights/skeletons/FlightEditSkeleton.vue
+++ /dev/null
@@ -1,77 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/flights/skeletons/FlightEditTrackSkeleton.vue b/src/components/flights/skeletons/FlightEditTrackSkeleton.vue
new file mode 100644
index 0000000..17db280
--- /dev/null
+++ b/src/components/flights/skeletons/FlightEditTrackSkeleton.vue
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/photos/BatchPhotoFormDialog.vue b/src/components/photos/BatchPhotoFormDialog.vue
index 556388a..a10f5af 100644
--- a/src/components/photos/BatchPhotoFormDialog.vue
+++ b/src/components/photos/BatchPhotoFormDialog.vue
@@ -19,6 +19,9 @@ const props = defineProps({
copilots: {
type: Array
},
+ loading: {
+ type: Boolean
+ }
});
const formData = ref({
@@ -44,7 +47,12 @@ const setup = () => {
-
+
+
+
+
+
+
{
-
+
+
+
+
{
option-value="id"
emit-value
map-options
- />
+ />
diff --git a/src/components/photos/PhotosEditorList.vue b/src/components/photos/PhotosEditorList.vue
index 0b59902..6c12bd3 100644
--- a/src/components/photos/PhotosEditorList.vue
+++ b/src/components/photos/PhotosEditorList.vue
@@ -86,7 +86,7 @@ const showLarge = (displayedPhoto) => {
-
+
diff --git a/src/pages/profile/flight/EditFlightPage.vue b/src/pages/profile/flight/EditFlightPage.vue
index 9358f4f..2f5d110 100644
--- a/src/pages/profile/flight/EditFlightPage.vue
+++ b/src/pages/profile/flight/EditFlightPage.vue
@@ -7,53 +7,19 @@ export default {
return useFlightsStore().fetchDetail(flightId);
}
};
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ flightPlan.name }}
-
-
- Bez planu
-
-
-
+
diff --git a/src/pages/profile/flight/FlightDetailPage.vue b/src/pages/profile/flight/FlightDetailPage.vue
index cca0462..a34fe06 100644
--- a/src/pages/profile/flight/FlightDetailPage.vue
+++ b/src/pages/profile/flight/FlightDetailPage.vue
@@ -101,7 +101,7 @@ const togglePublicVisibility = (variables) => toggleVisibility({
toggleVisibility({
/>
@@ -129,12 +129,12 @@ const togglePublicVisibility = (variables) => toggleVisibility({
U tohoto letu nemáš nahrané žádné fotografie.
@@ -145,12 +145,12 @@ const togglePublicVisibility = (variables) => toggleVisibility({
Nemáš nastavenou žádnou trasu.
diff --git a/src/pages/profile/flight/NewFlightPage.vue b/src/pages/profile/flight/NewFlightPage.vue
index 62a5df3..815f96f 100644
--- a/src/pages/profile/flight/NewFlightPage.vue
+++ b/src/pages/profile/flight/NewFlightPage.vue
@@ -32,10 +32,10 @@ const loading = computed(() => [
useAircraftsStore().isQueryRunning, usePointsOfInterestStore().isQueryRunning, useAirportsStore().isQueryRunning
].some(i => i.value))
-const router = useRouter();
+const $router = useRouter();
const handleSave = (formData) => {
useFlightsStore().create(formData).then((flight) => {
- router.push({name: "flightEdit", params: {id: flight.id, step: "copilot"}});
+ $router.push({name: "flightEdit", params: {id: flight.id, step: "copilot"}});
});
}
@@ -44,13 +44,12 @@ const handleSave = (formData) => {
-
-
-
+
diff --git a/src/pages/profile/flight/edit/EditFlightBasicInfoPage.vue b/src/pages/profile/flight/edit/EditFlightBasicInfoPage.vue
new file mode 100644
index 0000000..8f4c5ff
--- /dev/null
+++ b/src/pages/profile/flight/edit/EditFlightBasicInfoPage.vue
@@ -0,0 +1,40 @@
+
+
+
+
+
+
diff --git a/src/pages/profile/flight/edit/EditFlightExtraInfoPage.vue b/src/pages/profile/flight/edit/EditFlightExtraInfoPage.vue
new file mode 100644
index 0000000..20f5a71
--- /dev/null
+++ b/src/pages/profile/flight/edit/EditFlightExtraInfoPage.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
+
diff --git a/src/pages/profile/flight/edit/EditFlightPhotosPage.vue b/src/pages/profile/flight/edit/EditFlightPhotosPage.vue
new file mode 100644
index 0000000..48125df
--- /dev/null
+++ b/src/pages/profile/flight/edit/EditFlightPhotosPage.vue
@@ -0,0 +1,156 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/profile/flight/edit/EditFlightPlanPage.vue b/src/pages/profile/flight/edit/EditFlightPlanPage.vue
new file mode 100644
index 0000000..bb076db
--- /dev/null
+++ b/src/pages/profile/flight/edit/EditFlightPlanPage.vue
@@ -0,0 +1,31 @@
+
+
+
+
+ {{ flightPlan.name }}
+
+
+ Bez planu
+
+
diff --git a/src/pages/profile/flight/edit/EditFlightTrackPage.vue b/src/pages/profile/flight/edit/EditFlightTrackPage.vue
new file mode 100644
index 0000000..0a5f308
--- /dev/null
+++ b/src/pages/profile/flight/edit/EditFlightTrackPage.vue
@@ -0,0 +1,37 @@
+
+
+
+
+
+
diff --git a/src/router/routes.js b/src/router/routes.js
index 6c6db92..74b89a2 100644
--- a/src/router/routes.js
+++ b/src/router/routes.js
@@ -53,10 +53,17 @@ const routes = [
{path: '', name: "myFlights", component: () => import('pages/profile/flight/FlightsPage.vue')},
{path: 'lety/novy', name: "addFlight", component: () => import('pages/profile/flight/NewFlightPage.vue')},
{path: 'lety/:id', name: "flightDetail", component: () => import('pages/profile/flight/FlightDetailPage.vue')},
- {path: 'lety/:id/edit/:step?', name: "flightEdit", component: () => import('pages/profile/flight/EditFlightPage.vue')},
-
+ {
+ path: 'lety/:id/edit',
+ component: () => import('pages/profile/flight/EditFlightPage.vue'),
+ children: [
+ {path: '', name: "editFlightBasic", component: () => import('pages/profile/flight/edit/EditFlightBasicInfoPage.vue')},
+ {path: 'trasa', name: "editFlightTrack", component: () => import('pages/profile/flight/edit/EditFlightTrackPage.vue')},
+ {path: 'foto', name: "editFlightPhotos", component: () => import('pages/profile/flight/edit/EditFlightPhotosPage.vue')},
+ {path: 'poznamky', name: "editFlightNotes", component: () => import('pages/profile/flight/edit/EditFlightExtraInfoPage.vue')},
+ {path: 'plan', name: "editFlightSetPlan", component: () => import('pages/profile/flight/edit/EditFlightPlanPage.vue')},
+ ]},
{path: 'nastaveni', name: "profile", component: () => import('pages/profile/ProfilePage.vue')},
-
{path: 'plany', name: "flightPlans", component: () => import('pages/profile/flightPlanner/FlightPlansPage.vue')},
{path: 'plany/novy', name: "newFlightPlan", component: () => import('pages/profile/flightPlanner/NewFlightPlanPage.vue')},
{