30 lines
934 B
Vue
30 lines
934 B
Vue
<script setup>
|
|
import FlightsList from "components/flights/FlightsList.vue";
|
|
import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleton.vue";
|
|
import FAB from "components/FAB.vue";
|
|
import {useAppStore} from "stores/App";
|
|
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
|
import {useFlightsStore} from "stores/Flights";
|
|
import {storeToRefs} from "pinia";
|
|
|
|
useAppStore().setPageTitle("Moje lety");
|
|
useFlightsStore().fetch({});
|
|
const {flights, isQueryRunning} = storeToRefs(useFlightsStore());
|
|
</script>
|
|
|
|
<template>
|
|
<FlightsListSkeleton v-if="isQueryRunning"/>
|
|
|
|
<BasicInfoBanner
|
|
v-else-if="!isQueryRunning && flights.length === 0"
|
|
:route-add="{name: 'addFlight'}"
|
|
label-add="Přidat let"
|
|
>
|
|
Nemáš zaznamenaný žádný let.
|
|
</BasicInfoBanner>
|
|
|
|
<FlightsList v-else :items="flights" :public="false" />
|
|
|
|
<FAB mode="add" :router-link="{name: 'addFlight'}"/>
|
|
</template>
|