37 lines
1.1 KiB
Vue
37 lines
1.1 KiB
Vue
<script setup>
|
|
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";
|
|
import {onMounted} from "vue";
|
|
|
|
useAppStore().setPageTitle("Spolucestující");
|
|
useAppStore().setBreadcrumbs([])
|
|
|
|
onMounted(() => {
|
|
useCopilotsStore().fetch();
|
|
});
|
|
|
|
const {isQueryRunning, copilots} = storeToRefs(useCopilotsStore());
|
|
</script>
|
|
|
|
<template>
|
|
<BasicListSkeleton :items="10" v-if="isQueryRunning"/>
|
|
|
|
<BasicInfoBanner
|
|
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.
|
|
<br>
|
|
Zatím tu není nikdo. Přidej si let s někým nebo kopilota vytvoř ručně tu.
|
|
</BasicInfoBanner>
|
|
|
|
<CopilotsList :items="copilots" v-else/>
|
|
|
|
<FAB :router-link="{name: 'addCopilot'}" mode="add"/>
|
|
</template>
|