Bugfixing
This commit is contained in:
@@ -1,11 +1,20 @@
|
||||
<script>
|
||||
import {useAircraftsStore} from "stores/Aircrafts";
|
||||
|
||||
export default {
|
||||
preFetch({currentRoute}) {
|
||||
return useAircraftsStore().fetchPublicDetail(currentRoute.params.id);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script setup>
|
||||
import {useRoute, useRouter} from "vue-router";
|
||||
import {useRouter} from "vue-router";
|
||||
import {useMeta, useQuasar} from "quasar";
|
||||
import AircraftDetailSkeleton from "components/aircrafts/skeletons/AircraftDetailSkeleton.vue";
|
||||
import {useAppStore} from "stores/App";
|
||||
import FlightsList from "components/flights/FlightsList.vue";
|
||||
import {storeToRefs} from "pinia";
|
||||
import {onMounted, onServerPrefetch} from "vue";
|
||||
import {onMounted} from "vue";
|
||||
import {metaData} from "src/composables/meta";
|
||||
import PhotoGallery from "components/photos/PhotoGallery.vue";
|
||||
import ContentCard from "components/ContentCard.vue";
|
||||
@@ -15,16 +24,10 @@ import {usePhotosStore} from "stores/Photos";
|
||||
import {useFlightsStore} from "stores/Flights";
|
||||
import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleton.vue";
|
||||
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
||||
import {useAircraftsStore} from "stores/Aircrafts";
|
||||
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
||||
|
||||
const $q = useQuasar();
|
||||
const $router = useRouter();
|
||||
const $route = useRoute();
|
||||
|
||||
onServerPrefetch(() => {
|
||||
return useAircraftsStore().fetchPublicDetail($route.params.id);
|
||||
});
|
||||
|
||||
const loggedUser = storeToRefs(useUserStore()).user;
|
||||
const {aircraft, isQueryRunning} = storeToRefs(useAircraftsStore());
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
<script>
|
||||
import {usePointsOfInterestStore} from "stores/PointsOfInterest";
|
||||
|
||||
export default {
|
||||
preFetch({currentRoute}) {
|
||||
return usePointsOfInterestStore().fetchPublicDetail(currentRoute.params.id);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<script setup>
|
||||
import {storeToRefs} from "pinia";
|
||||
import {usePhotosStore} from "stores/Photos";
|
||||
@@ -11,23 +21,13 @@ import {useMeta} from "quasar";
|
||||
import {metaData} from "src/composables/meta";
|
||||
import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleton.vue";
|
||||
import BasicInfoBanner from "components/banners/BasicInfoBanner.vue";
|
||||
import {usePointsOfInterestStore} from "stores/PointsOfInterest";
|
||||
import {onServerPrefetch} from "vue";
|
||||
import {useRoute} from "vue-router";
|
||||
|
||||
const $route = useRoute();
|
||||
|
||||
onServerPrefetch(() => {
|
||||
return usePointsOfInterestStore().fetchPublicDetail($route.params.id);
|
||||
});
|
||||
import {onMounted} from "vue";
|
||||
import PhotoGallerySkeleton from "components/photos/skeletons/PhotoGallerySkeleton.vue";
|
||||
|
||||
const {pointOfInterest, isQueryRunning} = storeToRefs(usePointsOfInterestStore());
|
||||
const {photos, isQueryRunning: arePhotosLoading} = storeToRefs(usePhotosStore());
|
||||
const {flights, isQueryRunning: areFlightsLoading} = storeToRefs(useFlightsStore());
|
||||
|
||||
usePhotosStore().fetchPublic({pointOfInterestId: pointOfInterest.value.id});
|
||||
useFlightsStore().fetchPublic({pointOfInterestId: pointOfInterest.value.id});
|
||||
|
||||
useAppStore().setPageTitle(pointOfInterest.value.name);
|
||||
useMeta(() => metaData({
|
||||
title: pointOfInterest.value.name,
|
||||
@@ -38,6 +38,12 @@ useAppStore().setBreadcrumbs([
|
||||
{to: {name: 'homepage'}, label: "Polétání.cz"},
|
||||
{label: pointOfInterest.value.name}
|
||||
]);
|
||||
|
||||
onMounted(() => {
|
||||
usePhotosStore().fetchPublic({pointOfInterestId: pointOfInterest.value.id});
|
||||
useFlightsStore().fetchPublic({pointOfInterestId: pointOfInterest.value.id});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -54,7 +60,8 @@ useAppStore().setBreadcrumbs([
|
||||
:zoom="13"
|
||||
/>
|
||||
|
||||
<PhotoGallery :photos="photos" class="q-my-lg"/>
|
||||
<PhotoGallerySkeleton v-if="arePhotosLoading && !pointOfInterest" />
|
||||
<PhotoGallery :photos="photos" class="q-my-lg" v-else />
|
||||
|
||||
<h3>Lety na místo {{ pointOfInterest.name }}</h3>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user