Fix nacitani letu u eventu
This commit is contained in:
@@ -16,9 +16,10 @@ ${FRAGMENT_FLIGHT_LIST_INFO}
|
||||
`;
|
||||
|
||||
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(
|
||||
username: $username,
|
||||
eventId: $eventId,
|
||||
aircraftId: $aircraftId,
|
||||
copilotId: $copilotId,
|
||||
pointOfInterestId: $pointOfInterestId,
|
||||
|
||||
@@ -43,7 +43,7 @@ useMeta(() => metaData({
|
||||
|
||||
const loadNextFlightsPage = (appendItems) => loadPage({
|
||||
fetchFunc: useFlightsStore().fetchPublic,
|
||||
filters: {username: props.pilot.publicUsername},
|
||||
filters: {username: props.pilot.publicUsername, eventId: event.value.id},
|
||||
appendItems
|
||||
});
|
||||
loadNextFlightsPage(false);
|
||||
|
||||
@@ -49,10 +49,10 @@ export const useFlightsStore = defineStore('Flights', () => {
|
||||
}
|
||||
}).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,
|
||||
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));
|
||||
|
||||
const create = (input) => mutate({
|
||||
|
||||
Reference in New Issue
Block a user