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
+8 -5
View File
@@ -1,23 +1,26 @@
<script setup>
import {onMounted} from "vue";
import {fetchCopilots, loading, copilots} from "src/composables/objects/copilot";
import CopilotsList from "components/copilots/CopilotsList.vue";
import FAB from "components/FAB.vue";
import {useAppStore} from "stores/App";
import BasicListSkeleton from "components/basicSkeletons/BasicListSkeleton.vue";
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
import {useCopilotsStore} from "stores/Copilots";
import {storeToRefs} from "pinia";
onMounted(() => {
fetchCopilots();
useCopilotsStore().fetch();
useAppStore().setPageTitle("Spolucestující");
})
});
const {isQueryRunning, copilots} = storeToRefs(useCopilotsStore());
</script>
<template>
<BasicListSkeleton :items-count-min="5" :items-count-max="10" v-if="loading"/>
<BasicListSkeleton :items="10" v-if="isQueryRunning"/>
<BasicInfoBanner
v-else-if="!loading && copilots.length === 0"
v-else-if="!isQueryRunning && copilots.length === 0"
:router-add="{name: 'addCopilot'}"
>
V tomto seznamu budou uvedeni všichni, kteří s tebou absolvovali nějaký tvůj let.