diff --git a/src/graphql/queries/flights.js b/src/graphql/queries/flights.js index e491322..f2373b5 100644 --- a/src/graphql/queries/flights.js +++ b/src/graphql/queries/flights.js @@ -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, diff --git a/src/pages/ContactPage.vue b/src/pages/public/ContactPage.vue similarity index 100% rename from src/pages/ContactPage.vue rename to src/pages/public/ContactPage.vue diff --git a/src/pages/public/pilotProfile/EventDetailPage.vue b/src/pages/public/pilotProfile/EventDetailPage.vue index 8d3d556..971843d 100644 --- a/src/pages/public/pilotProfile/EventDetailPage.vue +++ b/src/pages/public/pilotProfile/EventDetailPage.vue @@ -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); diff --git a/src/stores/Flights.js b/src/stores/Flights.js index 9b1d2ea..97f1d41 100644 --- a/src/stores/Flights.js +++ b/src/stores/Flights.js @@ -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({