Slugy, webp, hromada refaktoringu
This commit is contained in:
@@ -3,7 +3,7 @@ import {useAircraftsStore} from "stores/Aircrafts";
|
||||
|
||||
export default {
|
||||
preFetch({currentRoute}) {
|
||||
return useAircraftsStore().fetchPublicDetail(currentRoute.params.id);
|
||||
return useAircraftsStore().fetchPublicDetail(currentRoute.params.callSign);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -48,6 +48,7 @@ useMeta(() => metaData({
|
||||
}));
|
||||
useAppStore().setBreadcrumbs([
|
||||
{label: "Polétání.cz", to: {name: "homepage"}},
|
||||
{label: "Letadla"},
|
||||
{label: aircraft.value.callSign}
|
||||
]);
|
||||
|
||||
@@ -88,8 +89,8 @@ onMounted(() => {
|
||||
:total-items-count="totalItemsCount"
|
||||
:is-query-running="areFlightsLoading"
|
||||
:items-per-page="paginationLimit"
|
||||
:public="true"
|
||||
@load-more="loadNextFlightsPage(true)"
|
||||
:public="true"
|
||||
/>
|
||||
</q-card-section>
|
||||
</template>
|
||||
|
||||
@@ -3,7 +3,7 @@ import {useCopilotsStore} from "stores/Copilots";
|
||||
|
||||
export default {
|
||||
preFetch({currentRoute}) {
|
||||
return useCopilotsStore().fetchPublicDetail(currentRoute.params.id, currentRoute.params.username);
|
||||
return useCopilotsStore().fetchPublicDetail(currentRoute.params.copilotSlug, currentRoute.params.username);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,7 @@ import {useEventsStore} from "stores/Events";
|
||||
|
||||
export default {
|
||||
preFetch({currentRoute}) {
|
||||
return useEventsStore().fetchPublicDetail(currentRoute.params.id, currentRoute.params.username);
|
||||
return useEventsStore().fetchPublicDetail(currentRoute.params.eventSlug, currentRoute.params.username);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,10 @@ import {useFlightsStore} from "stores/Flights";
|
||||
|
||||
export default {
|
||||
preFetch({store, currentRoute}) {
|
||||
return useFlightsStore(store).fetchPublicDetail(currentRoute.params.id, currentRoute.params.username)
|
||||
return useFlightsStore(store).fetchPublicDetail({
|
||||
urlSlug: currentRoute.params.flightSlug,
|
||||
username: currentRoute.params.username
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -3,7 +3,7 @@ import {usePointsOfInterestStore} from "stores/PointsOfInterest";
|
||||
|
||||
export default {
|
||||
preFetch({currentRoute}) {
|
||||
return usePointsOfInterestStore().fetchPublicDetail(currentRoute.params.id);
|
||||
return usePointsOfInterestStore().fetchPublicDetail(currentRoute.params.slug);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -13,7 +13,7 @@ const logUser = () => {
|
||||
useAuthStore().login(formData).then(() => {
|
||||
$router.push({name: "myFlights"});
|
||||
}).catch((err) => {
|
||||
$q.notify(errorObject("Přihlášení se nezdařilo."))
|
||||
$q.notify(errorObject(`Přihlášení se nezdařilo. ${err}`))
|
||||
})
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user