Pagination prepsano do inteligentnejsi composable
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script setup>
|
||||
import {useRoute} from "vue-router";
|
||||
import {onMounted} from "vue";
|
||||
import CopilotDetailSkeleton from "components/copilots/skeletons/CopilotDetailSkeleton.vue";
|
||||
import {useAppStore} from "stores/App";
|
||||
import FlightsList from "components/flights/FlightsList.vue";
|
||||
@@ -8,15 +7,14 @@ import {useCopilotsStore} from "stores/Copilots";
|
||||
import {storeToRefs} from "pinia";
|
||||
import PhotoGallery from "components/photos/PhotoGallery.vue";
|
||||
import ContentCard from "components/ContentCard.vue";
|
||||
import {filters, loadPage, paginationLimit} from "src/composables/pagination";
|
||||
import {usePagination} from "src/composables/pagination";
|
||||
import {useFlightsStore} from "stores/Flights";
|
||||
import FlightsListSkeleton from "components/flights/skeletons/FlightsListSkeleton.vue";
|
||||
import {useMeta, useQuasar} from "quasar";
|
||||
import {useQuasar} from "quasar";
|
||||
import {useLoggedUserStore} from "stores/LoggedUser";
|
||||
import PublishButton from "components/inputs/PublishButton.vue";
|
||||
import CopyLinkButton from "components/inputs/CopyLinkButton.vue";
|
||||
import {toggleVisibility} from "src/composables/form/formHandling";
|
||||
import {metaData} from "src/composables/meta";
|
||||
|
||||
const copilotId = parseInt(useRoute().params.id);
|
||||
useCopilotsStore().fetchDetail(copilotId).then(() => {
|
||||
@@ -32,6 +30,7 @@ const togglePublicVisibility = (variables) => toggleVisibility({
|
||||
$q, store: useCopilotsStore(), object: copilot.value, variables
|
||||
});
|
||||
|
||||
const {filters, loadPage, paginationLimit} = usePagination();
|
||||
filters.value = {copilotId: copilotId};
|
||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
||||
fetchFunc: useFlightsStore().fetch, appendItems
|
||||
|
||||
Reference in New Issue
Block a user