Ne uplne otestovany prepis storu
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user