Fix nacitani letu u eventu
This commit is contained in:
@@ -16,9 +16,10 @@ ${FRAGMENT_FLIGHT_LIST_INFO}
|
|||||||
`;
|
`;
|
||||||
|
|
||||||
export const FLIGHTS_PUBLIC_LIST = gql`
|
export const FLIGHTS_PUBLIC_LIST = gql`
|
||||||
query FlightsPublicList($username: String, $aircraftId: Int, $copilotId: Int, $pointOfInterestId: Int, $limit: Int!, $offset: Int) {
|
query FlightsPublicList($username: String, $eventId: Int, $aircraftId: Int, $copilotId: Int, $pointOfInterestId: Int, $limit: Int!, $offset: Int) {
|
||||||
flights(
|
flights(
|
||||||
username: $username,
|
username: $username,
|
||||||
|
eventId: $eventId,
|
||||||
aircraftId: $aircraftId,
|
aircraftId: $aircraftId,
|
||||||
copilotId: $copilotId,
|
copilotId: $copilotId,
|
||||||
pointOfInterestId: $pointOfInterestId,
|
pointOfInterestId: $pointOfInterestId,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ useMeta(() => metaData({
|
|||||||
|
|
||||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
const loadNextFlightsPage = (appendItems) => loadPage({
|
||||||
fetchFunc: useFlightsStore().fetchPublic,
|
fetchFunc: useFlightsStore().fetchPublic,
|
||||||
filters: {username: props.pilot.publicUsername},
|
filters: {username: props.pilot.publicUsername, eventId: event.value.id},
|
||||||
appendItems
|
appendItems
|
||||||
});
|
});
|
||||||
loadNextFlightsPage(false);
|
loadNextFlightsPage(false);
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ export const useFlightsStore = defineStore('Flights', () => {
|
|||||||
}
|
}
|
||||||
}).then(data => setItems(data, appendItems, flights, totalItemsCount));
|
}).then(data => setItems(data, appendItems, flights, totalItemsCount));
|
||||||
|
|
||||||
const fetchPublic = ({username, aircraftId, copilotId, pointOfInterestId, offset, limit, appendItems}) => query({
|
const fetchPublic = ({username, eventId, aircraftId, copilotId, pointOfInterestId, offset, limit, appendItems}) => query({
|
||||||
isQueryRunning,
|
isQueryRunning,
|
||||||
query: FLIGHTS_PUBLIC_LIST,
|
query: FLIGHTS_PUBLIC_LIST,
|
||||||
variables: {username, aircraftId, copilotId, pointOfInterestId, offset, limit}
|
variables: {username, eventId, aircraftId, copilotId, pointOfInterestId, offset, limit}
|
||||||
}).then(items => setItems(items, appendItems, flights, totalItemsCount));
|
}).then(items => setItems(items, appendItems, flights, totalItemsCount));
|
||||||
|
|
||||||
const create = (input) => mutate({
|
const create = (input) => mutate({
|
||||||
|
|||||||
Reference in New Issue
Block a user