Ne uplne otestovany prepis storu

This commit is contained in:
Michal Kváček
2023-11-19 00:44:01 +01:00
parent e65491e00b
commit f9d70a5d57
76 changed files with 1445 additions and 1463 deletions
@@ -1,26 +1,29 @@
<script setup>
import {useRoute} from "vue-router";
import {onMounted} from "vue";
import {copilot, fetchCopilot, loading} from "src/composables/objects/copilot";
import CopilotDetailSkeleton from "components/copilots/CopilotDetailSkeleton.vue";
import {useAppStore} from "stores/App";
import FAB from "components/FAB.vue";
import FlightsList from "components/flights/FlightsList.vue";
import {useCopilotsStore} from "stores/Copilots";
import {storeToRefs} from "pinia";
const copilotId = parseInt(useRoute().params.id);
onMounted(() => {
fetchCopilot(copilotId).then(() => {
useCopilotsStore().fetchDetail(copilotId).then(() => {
useAppStore().setPageTitle(copilot.value.name);
useAppStore().setBreadcrumbs([
{to: {name: "copilots"}, label: "Kopiloti"},
{label: copilot.value.name}
])
});
})
});
const {isQueryRunning, copilot} = storeToRefs(useCopilotsStore());
</script>
<template>
<CopilotDetailSkeleton v-if="loading || !copilot"/>
<CopilotDetailSkeleton v-if="isQueryRunning || !copilot"/>
<template v-else>
<h3>Společné lety</h3>