Prace s mapu, zobrazeni GPX, editace kopilota, skeletony

This commit is contained in:
Michal Kváček
2023-08-07 23:22:28 +02:00
parent 09d2f25523
commit c4603cf090
55 changed files with 891 additions and 408 deletions
+5
View File
@@ -0,0 +1,5 @@
export const commonProps = {
class: "q-my-lg",
outlined: true,
standout: true
}
+1 -1
View File
@@ -8,7 +8,7 @@ export const aircraft = ref(null);
export const fetchAircraft = (aircraftId) => {
loading.value = true;
useAircraftsStore().fetchDetail(aircraftId).then((data) => {
return useAircraftsStore().fetchDetail(aircraftId).then((data) => {
aircraft.value = data;
}).catch(err => {
console.error(err);
+7 -3
View File
@@ -17,8 +17,11 @@ export const loading = ref(true);
export const flight = ref(null);
export const fetchFlight = (flightId) => {
loading.value = true;
useFlightsStore().fetchDetail(parseInt(flightId))
.then(respFlight => flight.value = respFlight)
return useFlightsStore().fetchDetail(parseInt(flightId))
.then(respFlight => {
flight.value = respFlight;
return respFlight;
})
.finally(() => loading.value = false);
};
@@ -32,7 +35,8 @@ export const fetchFlights = () => {
};
export const handleDeleteFlight = ($q, flightId, onOkCallback = () => {}) => {
export const handleDeleteFlight = ($q, flightId, onOkCallback = () => {
}) => {
$q.dialog(confirmObject(`Opravdu chceš smazat tento let?`))
.onOk(() => {
useFlightsStore().delete(flightId).then(onOkCallback);