Breadcrumbs resit pres funkce

This commit is contained in:
Michal Kváček
2024-03-13 06:35:26 +01:00
parent 5cff3580b0
commit 48f57cde0d
28 changed files with 152 additions and 172 deletions
@@ -30,12 +30,9 @@ const togglePublicVisibility = (variables) => toggleVisibility({
$q, store: useCopilotsStore(), object: copilot.value, variables
});
const {filters, loadPage, paginationLimit} = usePagination();
const {filters, loadPage, paginationLimit} = usePagination({fetchFunction: useFlightsStore().fetch});
filters.value = {copilotId: copilotId};
const loadNextFlightsPage = (appendItems) => loadPage({
fetchFunc: useFlightsStore().fetch, appendItems
});
loadNextFlightsPage(false);
loadPage(false);
const {isQueryRunning: areFlightsLoading, totalItemsCount, flights} = storeToRefs(useFlightsStore());
const {isQueryRunning, copilot} = storeToRefs(useCopilotsStore());
@@ -90,7 +87,7 @@ const loggedUser = storeToRefs(useLoggedUserStore()).user;
:total-items-count="totalItemsCount"
:is-query-running="areFlightsLoading"
:items-per-page="paginationLimit"
@load-more="loadNextFlightsPage(true)"
@load-more="loadPage(true)"
/>
<q-banner v-if="flights.length === 0" class="bg-light-blue text-white">
Zatím tu nemáš uložené žádné společné lety.