Napoveda, fix filtru pro nacitani letu u objektu
This commit is contained in:
@@ -16,7 +16,7 @@ import {successObject} from "src/composables/dialog";
|
||||
import ContentCardEditButton from "components/ContentCardEditButton.vue";
|
||||
import {useFlightsStore} from "stores/Flights";
|
||||
import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleton.vue";
|
||||
import {loadPage, paginationLimit} from "src/composables/pagination";
|
||||
import {filters, loadPage, paginationLimit} from "src/composables/pagination";
|
||||
import PublishButton from "components/inputs/PublishButton.vue";
|
||||
import CopyLinkButton from "components/inputs/CopyLinkButton.vue";
|
||||
|
||||
@@ -33,19 +33,20 @@ usePointsOfInterestStore().fetchDetail(poiId).then((p) => {
|
||||
])
|
||||
});
|
||||
|
||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
||||
fetchFunc: useFlightsStore().fetch,
|
||||
filters: {pointOfInterestId: poiId},
|
||||
appendItems
|
||||
});
|
||||
loadNextFlightsPage(false);
|
||||
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
||||
const {isQueryRunning, pointOfInterest} = storeToRefs(usePointsOfInterestStore());
|
||||
|
||||
const $q = useQuasar();
|
||||
const togglePublicVisibility = (variables) => toggleVisibility({
|
||||
$q, store: usePointsOfInterestStore(), object: pointOfInterest.value, variables
|
||||
});
|
||||
|
||||
filters.value = {pointOfInterestId: poiId};
|
||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
||||
fetchFunc: useFlightsStore().fetch,
|
||||
appendItems
|
||||
});
|
||||
loadNextFlightsPage(false);
|
||||
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
|
||||
const {isQueryRunning, pointOfInterest} = storeToRefs(usePointsOfInterestStore());
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -73,6 +74,7 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
||||
<q-card-section>
|
||||
|
||||
<ContentCardEditButton
|
||||
v-if="pointOfInterest.createdById === loggedUser?.id"
|
||||
:to="{name: 'poiEdit', params:{id: pointOfInterest.id, step: 'info'}}"
|
||||
label="Upravit informace"
|
||||
/>
|
||||
@@ -89,6 +91,7 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
||||
</BasicInfoBanner>
|
||||
|
||||
<ContentCardEditButton
|
||||
v-if="pointOfInterest.createdById === loggedUser?.id"
|
||||
:to="{name: 'poiEdit', params:{id: pointOfInterest.id, step: 'photo'}}"
|
||||
label="Úvodní fotografie"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user