Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
21,637 changes: 27 additions & 21,610 deletions frontend/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"react-dom": "^17.0.2",
"react-router-dom": "^5.3.0",
"react-scripts": "^4.0.3",
"react-stripe-checkout": "^2.6.3",
"start": "^5.1.0",
"web-vitals": "^1.1.2"

},
"scripts": {
"start": "react-scripts start",
Expand Down
14 changes: 12 additions & 2 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ import profile from "./components/editProfile/editProfile"
import InquiryFlights from "./components/InquiryFlights/clientFlight"
import AdminScreen from "./screens/AdminScreen/AdminScreen"
import myFlights from "./components/myFlights/myFlights"

import searchNewFlight from "./components/searchNewFlight/searchNewFlight"
import changeDpFlight from "./components/changeDpFlight/changeDpFlight"
import bookDp from "./components/bookDp/bookDp"

import payment from "./components/payment/payment"

import { useState } from "react";
import Button from '@mui/material/Button';
import test from "./components/test"
Expand All @@ -28,11 +35,11 @@ function App() {
<main className="App">


<Route path="/homepage" component={LandingPage} exact />
<Route path="/homepage" component={LandingPage} exact />
<Route path="/" component={LandingPage} exact />



<Route path="/payment" component={payment} exact />
<Route path="/myflights" component={myFlights} />
<Route path="/createFlight" component={createFlight} />
<Route path='/updateFlight/:id' component={updateFlight } />
Expand All @@ -48,6 +55,9 @@ function App() {
<Route path="/showInquiry" component={InquiryFlights} />
<Route path="/login" component={LoginScreen} />
<Route path="/register" component={RegisterScreen} />
<Route path="/searchNewFlight" component={searchNewFlight} />
<Route path="/changeDpFlight" component={changeDpFlight} />
<Route path="/bookDp" component={bookDp} />
</main>
</Router>
);
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/bookDp/bookDp.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ export default function CreateFlight({history}) {
// var secondId = JSON.parse(sessionStorage.getItem("flightsBook")).secondId;

axios.get(`http://localhost:8000/flights/bookFlights/${firstId}`).then((res)=>{
setF1(JSON.parse(sessionStorage.getItem("clientFlights")).FirstNumberOfSeats1*res.data.FirstPrice);
setB1(JSON.parse(sessionStorage.getItem("clientFlights")).BusinessNumberOfSeats1*res.data.BusinessPrice);
setE1(JSON.parse(sessionStorage.getItem("clientFlights")).EconomyNumberOfSeats1*res.data.EconomyPrice);
setF1(JSON.parse(sessionStorage.getItem("changeDpFlight")).FirstNumberOfSeats*res.data.FirstPrice);
setB1(JSON.parse(sessionStorage.getItem("changeDpFlight")).BusinessNumberOfSeats*res.data.BusinessPrice);
setE1(JSON.parse(sessionStorage.getItem("changeDpFlight")).EconomyNumberOfSeats*res.data.EconomyPrice);

setFlight1({
clientId:userInfo?userInfo._id:'',
Expand Down
Loading