Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update : give new approach without Makefile #243

Open
wants to merge 36 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
31844d2
install and create quasar project named frontend
Delpipi Jul 16, 2024
ed765e5
init amplify to add aws cloud to the project
Delpipi Jul 18, 2024
0bd687a
create and configure amplify authentication
Delpipi Jul 18, 2024
f8bc33d
create AuthenticationPage vue
Delpipi Jul 18, 2024
25428ad
update amplify auth(name,phone_number,email) and Layout adding (drawe…
Delpipi Jul 20, 2024
8421515
install, configure cypress and implement e2e-test for sign up & sign in
Delpipi Jul 20, 2024
3ee6bf6
create and configure Graphql api for adding Flight model
Delpipi Jul 21, 2024
40ae4fa
update Graphql api and Flight schema for authorizing user as Admin to…
Delpipi Jul 21, 2024
2ed32a2
create e2e-tests for create and schedule flight
Delpipi Jul 22, 2024
8551688
create FlightService.js
Delpipi Jul 22, 2024
7fe34ce
create FlightCard.vue, FlightLoader.vue, FlightToolbar.vue and Flight…
Delpipi Jul 23, 2024
be659f9
correct FlightResults.vue to display correctly
Delpipi Jul 26, 2024
68b3417
create SearchFlights.vue and implement navigation to FlightResults.vue
Delpipi Jul 26, 2024
a2fab75
add FlightToolbar.vue component to FlightResults.vue
Delpipi Jul 26, 2024
0fc6e50
implement search by price and time on FlightResults.vue using created…
Delpipi Jul 27, 2024
502aa80
update router.js to add proper name an alias
Delpipi Jul 27, 2024
1ef4898
update SearchFlights.vue by replacing q-input by q-select to enable a…
Delpipi Jul 27, 2024
8cda2a3
update SearchFlights.vue by replacing q-input by q-select to enable a…
Delpipi Jul 27, 2024
36f5986
updated amplify backend schema.graphql to add Booking model
Delpipi Jul 28, 2024
07ff099
install stripe, create BookingService.js and payment.js
Delpipi Jul 29, 2024
7cd530f
create FlightSelection.vue
Delpipi Jul 30, 2024
3166179
created booking_create.cy.js, booking_by_status.cy.js and updated Fli…
Delpipi Jul 30, 2024
8c29bb0
created bookings_by_status.cy.js, create_booking.cy.js, BookingCard.v…
Delpipi Jul 31, 2024
79b2a4a
updated BookingPage.vue and BookingService.vue to correct booking det…
Delpipi Aug 1, 2024
078b628
updated MainLayout.vue to include activation class to my bookings link
Delpipi Aug 1, 2024
d801953
updated FlightResult.vue to handle error
Delpipi Aug 1, 2024
1d83fcc
added loyalty schema
Delpipi Aug 2, 2024
41c6fcd
created LoyaltService.js
Delpipi Aug 2, 2024
404cffa
updated LoyaltService.js
Delpipi Aug 2, 2024
f40aaae
created ProfilePage.vue and update others vue to add login check
Delpipi Aug 2, 2024
1255100
updated views to integrate check authentication
Delpipi Aug 2, 2024
91e451d
created backend catalog
Delpipi Aug 2, 2024
588954b
installed the requirement.txt deps and lint, deps,.., tools
Delpipi Aug 3, 2024
9a529f8
added requirements dependencies to reserve-flight and release-flight
Delpipi Aug 3, 2024
d4e8a71
ran linting checks source code for catalog service
Delpipi Aug 5, 2024
eb8f696
add tests/unit to shared folder to perform test-unit
Delpipi Aug 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
create FlightService.js
  • Loading branch information
Delpipi committed Jul 22, 2024
commit 8551688e1e98c2e568931dbd17d87b34eabcb444
42 changes: 42 additions & 0 deletions src/frontend/src/services/FlightService.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import { generateClient } from 'aws-amplify/api';
import * as mutations from '../graphql/mutations';
import * as queries from '../graphql/queries';

const client = generateClient();

export const FlightService = {
async createFlight(flight) {
return await client.graphql({query: mutations.createFlight, variables: {input: flight}});
},

async updateFlight(flight) {
return await client.graphql({query: mutations.updateFlight, variables: {input: flight}});
},

async deleteFlight(flightId) {
return await client.graphql({query: mutations.deleteFlight, variables: { input: {id: flightId}}});
},

async getFlight(flightId) {
return await client.graphql({query: queries.getFlight, variables: {input : {id : flightId}}});
},

async listFlights(filter) {
return await client.graphql({query: queries.listFlights, variables: { filter: filter}});
},

async getFlightBySchedule(departureAirportCode, arrivalAirportCode, departureDate) {
return await client.graphql({query: queries.getFlightBySchedule,
variables: {
arrivalAirportCodeDepartureDate: {
beginsWith: {
arrivalAirportCode: arrivalAirportCode,
departureDate: departureDate
}
},
departureAirportCode: departureAirportCode
}
})
}
};