Prace s mapu, zobrazeni GPX, editace kopilota, skeletony
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
export const commonProps = {
|
||||
class: "q-my-lg",
|
||||
outlined: true,
|
||||
standout: true
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user