diff --git a/src/layout/App.tsx b/src/layout/App.tsx index 1aca6aa..3c615b0 100644 --- a/src/layout/App.tsx +++ b/src/layout/App.tsx @@ -1,6 +1,6 @@ import styles from "./App.module.css"; +import SideBar from "./SideBar/Sidebar"; import { createTestPassengerData } from "../util/test-data.util"; -import SideBar from "../components/SideBarComponent/SidebarComponent"; import { Outlet } from "react-router-dom"; const App = () => { diff --git a/src/layout/Router.tsx b/src/layout/Router.tsx index 512842c..44511b3 100644 --- a/src/layout/Router.tsx +++ b/src/layout/Router.tsx @@ -1,12 +1,12 @@ import App from "./App"; -import Dashboard from "../pages/Dashboard/Dashboard"; -import MyFlights from "../pages/MyFlights/MyFlights"; -import PersonalInfo from "../pages/PersonalInfo/PersonalInfo"; -import RequestFlight from "../pages/RequestFlight/RequestFlight"; -import SignIn from "../pages/SignIn/SignIn"; -import SignUp from "../pages/SignUp/SignUp"; +import DashboardPage from "../pages/DashboardPage/DashboardPage"; +import TripsPage from "../pages/TripsPage/TripsPage"; +import PersonalInfoPage from "../pages/PersonalInfoPage/PersonalInfoPage"; +import RequestFlightPage from "../pages/RequestFlightPage/RequestFlightPage"; +import SignInPage from "../pages/SignInPage/SignInPage"; +import SignUpPage from "../pages/SignUpPage/SignUpPage"; import ExamplePage from "../pages/ExamplePage/ExamplePage"; -import Passengers from "../pages/Passengers/Passengers"; +import PassengersPage from "../pages/PassengersPage/PassengersPage"; import { RouterProvider, createBrowserRouter } from "react-router-dom"; const router = createBrowserRouter([ @@ -16,27 +16,27 @@ const router = createBrowserRouter([ children: [ { path: "/sign-up", - element: , + element: , }, { path: "/sign-in", - element: , + element: , }, { path: "/dashboard", - element: , + element: , }, { path: "/request", - element: , + element: , }, { - path: "/my-flights", - element: , + path: "/trips", + element: , }, { path: "/personal-info", - element: , + element: , }, { path: "/example", @@ -44,7 +44,7 @@ const router = createBrowserRouter([ }, { path: "/passengers", - element: , + element: , }, ], }, diff --git a/src/components/SideBarComponent/SideBarComponent.definitions.ts b/src/layout/SideBar/SideBar.definitions.ts similarity index 69% rename from src/components/SideBarComponent/SideBarComponent.definitions.ts rename to src/layout/SideBar/SideBar.definitions.ts index f042f1f..706e1d0 100644 --- a/src/components/SideBarComponent/SideBarComponent.definitions.ts +++ b/src/layout/SideBar/SideBar.definitions.ts @@ -9,8 +9,9 @@ export interface Tab { export enum Tabs { DASHBOARD = "Dashboard", + PASSENGERS = "Patient and Passengers", + DOCUMENTS = "Documents", + TRIPS = "Trips", + PERSONAL_INFO = "Personal Info", REQUEST = "Request a Flight", - MYFLIGHTS = "My Flights", - PERSONALINFO = "Personal Info", - PASSENGERS = "Passengers", } diff --git a/src/components/SideBarComponent/SideBarComponent.module.css b/src/layout/SideBar/SideBar.module.css similarity index 100% rename from src/components/SideBarComponent/SideBarComponent.module.css rename to src/layout/SideBar/SideBar.module.css diff --git a/src/components/SideBarComponent/SidebarComponent.tsx b/src/layout/SideBar/Sidebar.tsx similarity index 90% rename from src/components/SideBarComponent/SidebarComponent.tsx rename to src/layout/SideBar/Sidebar.tsx index bdbd663..fb045e2 100644 --- a/src/components/SideBarComponent/SidebarComponent.tsx +++ b/src/layout/SideBar/Sidebar.tsx @@ -1,5 +1,5 @@ -import styles from "./SideBarComponent.module.css"; -import { Tabs, type Tab } from "./SideBarComponent.definitions"; +import styles from "./SideBar.module.css"; +import { Tabs, type Tab } from "./SideBar.definitions"; import { useState } from "react"; import { useNavigate } from "react-router-dom"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; @@ -11,6 +11,7 @@ import { faPerson, faPlane, faTicket, + faFile, } from "@fortawesome/free-solid-svg-icons"; const renderTab = ( @@ -67,24 +68,29 @@ const SideBar = () => { icon: faHome, }, { - title: Tabs.REQUEST, + title: Tabs.PASSENGERS, + link: "passengers", + icon: faPeopleGroup, + }, + { + title: Tabs.DOCUMENTS, link: "request", - icon: faTicket, + icon: faFile, }, { - title: Tabs.MYFLIGHTS, - link: "my-flights", + title: Tabs.TRIPS, + link: "trips", icon: faPlane, }, { - title: Tabs.PERSONALINFO, + title: Tabs.PERSONAL_INFO, link: "personal-info", icon: faPerson, }, { - title: Tabs.PASSENGERS, - link: "passengers", - icon: faPeopleGroup, + title: Tabs.REQUEST, + link: "request", + icon: faTicket, }, ]; diff --git a/src/components/SideBarComponent/__tests__/SideBarComponent.test.tsx b/src/layout/SideBar/__tests__/SideBarComponent.test.tsx similarity index 85% rename from src/components/SideBarComponent/__tests__/SideBarComponent.test.tsx rename to src/layout/SideBar/__tests__/SideBarComponent.test.tsx index 848d422..052ad7d 100644 --- a/src/components/SideBarComponent/__tests__/SideBarComponent.test.tsx +++ b/src/layout/SideBar/__tests__/SideBarComponent.test.tsx @@ -1,4 +1,4 @@ -import SideBar from "../SidebarComponent"; +import SideBar from "../Sidebar"; import { fireEvent, render } from "@testing-library/react"; // mock the router provider @@ -20,9 +20,9 @@ describe("SideBarComponent", () => { // check if the tabs are there expect(component.getByText("DASHBOARD")).toBeTruthy(); expect(component.getByText("REQUEST A FLIGHT")).toBeTruthy(); - expect(component.getByText("MY FLIGHTS")).toBeTruthy(); + expect(component.getByText("TRIPS")).toBeTruthy(); expect(component.getByText("PERSONAL INFO")).toBeTruthy(); - expect(component.getByText("PASSENGERS")).toBeTruthy(); + expect(component.getByText("PATIENT AND PASSENGERS")).toBeTruthy(); // get the open button and click it const openButton = component.getByTestId("open-button"); @@ -31,9 +31,9 @@ describe("SideBarComponent", () => { // check if that worked (the text shouldn't be there anymore) expect(component.queryByText("DASHBOARD")).toBeFalsy(); expect(component.queryByText("REQUEST A FLIGHT")).toBeFalsy(); - expect(component.queryByText("MY FLIGHTS")).toBeFalsy(); + expect(component.queryByText("TRIPS")).toBeFalsy(); expect(component.queryByText("PERSONAL INFO")).toBeFalsy(); - expect(component.queryByText("PASSENGERS")).toBeFalsy(); + expect(component.queryByText("PATIENT AND PASSENGERS")).toBeFalsy(); }); it("correctly switches tabs", () => { @@ -55,7 +55,7 @@ describe("SideBarComponent", () => { expect(requestTab.className).toContain("SideBarTitleSelected"); // get the my flights tab and click it - const myFlightsTab = component.getByText("MY FLIGHTS"); + const myFlightsTab = component.getByText("TRIPS"); fireEvent.click(myFlightsTab); // check if the my flights tab is selected @@ -70,7 +70,7 @@ describe("SideBarComponent", () => { expect(personalInfoTab.className).toContain("SideBarTitleSelected"); // get the passengers tab and click it - const passengersTab = component.getByText("PASSENGERS"); + const passengersTab = component.getByText("PATIENT AND PASSENGERS"); fireEvent.click(passengersTab); // check if the passengers tab is selected diff --git a/src/pages/Dashboard/Dashboard.tsx b/src/pages/DashboardPage/DashboardPage.tsx similarity index 96% rename from src/pages/Dashboard/Dashboard.tsx rename to src/pages/DashboardPage/DashboardPage.tsx index 342d50f..c8510fa 100644 --- a/src/pages/Dashboard/Dashboard.tsx +++ b/src/pages/DashboardPage/DashboardPage.tsx @@ -3,7 +3,7 @@ import Select from "../../components/SelectComponent/SelectComponent"; import { useForm } from "react-hook-form"; import type { SubmitHandler, FieldValues } from "react-hook-form"; -const Dashboard = () => { +const DashboardPage = () => { const onSubmit: SubmitHandler = (data) => { console.log(data); }; @@ -64,4 +64,4 @@ const Dashboard = () => { ); }; -export default Dashboard; +export default DashboardPage; diff --git a/src/pages/Passengers/Passengers.tsx b/src/pages/PassengersPage/PassengersPage.tsx similarity index 60% rename from src/pages/Passengers/Passengers.tsx rename to src/pages/PassengersPage/PassengersPage.tsx index 0804707..301db66 100644 --- a/src/pages/Passengers/Passengers.tsx +++ b/src/pages/PassengersPage/PassengersPage.tsx @@ -1,11 +1,11 @@ -import Passenger from "../../components/Passenger/Passenger"; +import Passenger from "./components/Passenger/Passenger"; import { createTestPassengerData } from "../../util/test-data.util"; -const Passengers = () => { +const PassengersPage = () => { // Passengers tab console.log("Passengers"); return ; }; -export default Passengers; +export default PassengersPage; diff --git a/src/components/Passenger/Passenger.definitions.ts b/src/pages/PassengersPage/components/Passenger/Passenger.definitions.ts similarity index 65% rename from src/components/Passenger/Passenger.definitions.ts rename to src/pages/PassengersPage/components/Passenger/Passenger.definitions.ts index 1e20419..518af54 100644 --- a/src/components/Passenger/Passenger.definitions.ts +++ b/src/pages/PassengersPage/components/Passenger/Passenger.definitions.ts @@ -1,4 +1,4 @@ -import type { PassengerData } from "../../interfaces/passenger.interface"; +import type { PassengerData } from "../../../../interfaces/passenger.interface"; /** * Passenger Props diff --git a/src/components/Passenger/Passenger.module.css b/src/pages/PassengersPage/components/Passenger/Passenger.module.css similarity index 100% rename from src/components/Passenger/Passenger.module.css rename to src/pages/PassengersPage/components/Passenger/Passenger.module.css diff --git a/src/components/Passenger/Passenger.tsx b/src/pages/PassengersPage/components/Passenger/Passenger.tsx similarity index 79% rename from src/components/Passenger/Passenger.tsx rename to src/pages/PassengersPage/components/Passenger/Passenger.tsx index 727670b..831c577 100644 --- a/src/components/Passenger/Passenger.tsx +++ b/src/pages/PassengersPage/components/Passenger/Passenger.tsx @@ -1,13 +1,16 @@ import styles from "./Passenger.module.css"; -import { formatDate, getAge } from "../../util/date.util"; -import PassengerDetailsModal from "../../modals/PassengerDetailsModal/PassengerDetailsModal"; -import Tag from "../TagComponent/Tag"; -import { TagColor, TagVariant } from "../TagComponent/Tag.definitions"; -import Button from "../ButtonComponent/ButtonComponent"; +import { formatDate, getAge } from "../../../../util/date.util"; +import PassengerDetailsModal from "../PassengerDetailsModal/PassengerDetailsModal"; +import Tag from "../../../../components/TagComponent/Tag"; +import { + TagColor, + TagVariant, +} from "../../../../components/TagComponent/Tag.definitions"; +import Button from "../../../../components/ButtonComponent/ButtonComponent"; import { ButtonColor, ButtonVariant, -} from "../ButtonComponent/ButtonComponent.definitions"; +} from "../../../../components/ButtonComponent/ButtonComponent.definitions"; import { useState } from "react"; import type { PassengerProps } from "./Passenger.definitions"; diff --git a/src/components/Passenger/__tests__/Passenger.test.tsx b/src/pages/PassengersPage/components/Passenger/__tests__/Passenger.test.tsx similarity index 85% rename from src/components/Passenger/__tests__/Passenger.test.tsx rename to src/pages/PassengersPage/components/Passenger/__tests__/Passenger.test.tsx index 6e36045..50671bd 100644 --- a/src/components/Passenger/__tests__/Passenger.test.tsx +++ b/src/pages/PassengersPage/components/Passenger/__tests__/Passenger.test.tsx @@ -1,5 +1,5 @@ -import { getAge } from "../../../util/date.util"; -import { createTestPassengerData } from "../../../util/test-data.util"; +import { getAge } from "../../../../../util/date.util"; +import { createTestPassengerData } from "../../../../../util/test-data.util"; import Passenger from "../Passenger"; import { render } from "@testing-library/react"; diff --git a/src/modals/PassengerDetailsModal/PassengerDetailsModal.definitions.ts b/src/pages/PassengersPage/components/PassengerDetailsModal/PassengerDetailsModal.definitions.ts similarity index 55% rename from src/modals/PassengerDetailsModal/PassengerDetailsModal.definitions.ts rename to src/pages/PassengersPage/components/PassengerDetailsModal/PassengerDetailsModal.definitions.ts index 1a364f7..e531309 100644 --- a/src/modals/PassengerDetailsModal/PassengerDetailsModal.definitions.ts +++ b/src/pages/PassengersPage/components/PassengerDetailsModal/PassengerDetailsModal.definitions.ts @@ -1,4 +1,4 @@ -import type { PassengerData } from "../../interfaces/passenger.interface"; +import type { PassengerData } from "../../../../interfaces/passenger.interface"; export interface PassengerDetailsModalProps { passenger: PassengerData; diff --git a/src/modals/PassengerDetailsModal/PassengerDetailsModal.module.css b/src/pages/PassengersPage/components/PassengerDetailsModal/PassengerDetailsModal.module.css similarity index 100% rename from src/modals/PassengerDetailsModal/PassengerDetailsModal.module.css rename to src/pages/PassengersPage/components/PassengerDetailsModal/PassengerDetailsModal.module.css diff --git a/src/modals/PassengerDetailsModal/PassengerDetailsModal.tsx b/src/pages/PassengersPage/components/PassengerDetailsModal/PassengerDetailsModal.tsx similarity index 100% rename from src/modals/PassengerDetailsModal/PassengerDetailsModal.tsx rename to src/pages/PassengersPage/components/PassengerDetailsModal/PassengerDetailsModal.tsx diff --git a/src/pages/PersonalInfo/PersonalInfo.definitions.tsx b/src/pages/PersonalInfoPage/PersonalInfoPage.definitions.tsx similarity index 100% rename from src/pages/PersonalInfo/PersonalInfo.definitions.tsx rename to src/pages/PersonalInfoPage/PersonalInfoPage.definitions.tsx diff --git a/src/pages/PersonalInfo/PersonalInfo.module.css b/src/pages/PersonalInfoPage/PersonalInfoPage.module.css similarity index 100% rename from src/pages/PersonalInfo/PersonalInfo.module.css rename to src/pages/PersonalInfoPage/PersonalInfoPage.module.css diff --git a/src/pages/PersonalInfo/PersonalInfo.tsx b/src/pages/PersonalInfoPage/PersonalInfoPage.tsx similarity index 96% rename from src/pages/PersonalInfo/PersonalInfo.tsx rename to src/pages/PersonalInfoPage/PersonalInfoPage.tsx index cc33248..448fb43 100644 --- a/src/pages/PersonalInfo/PersonalInfo.tsx +++ b/src/pages/PersonalInfoPage/PersonalInfoPage.tsx @@ -1,9 +1,9 @@ -import styles from "./PersonalInfo.module.css"; +import styles from "./PersonalInfoPage.module.css"; import { createTestPassengerData } from "../../util/test-data.util"; import { useMemo, useState } from "react"; import type { PassengerData } from "../../interfaces/passenger.interface"; -const PersonalInfo = () => { +const PersonalInfoPage = () => { const [tabIndex, setTabIndex] = useState(0); const tabs = ["General", "Medical", "Financial", "Flight History"]; const data: PassengerData = createTestPassengerData(); @@ -111,4 +111,4 @@ const PersonalInfo = () => { ); }; -export default PersonalInfo; +export default PersonalInfoPage; diff --git a/src/pages/PersonalInfo/__tests__/PersonalInfo.test.tsx b/src/pages/PersonalInfoPage/__tests__/PersonalInfo.test.tsx similarity index 95% rename from src/pages/PersonalInfo/__tests__/PersonalInfo.test.tsx rename to src/pages/PersonalInfoPage/__tests__/PersonalInfo.test.tsx index 0222d33..8163e9d 100644 --- a/src/pages/PersonalInfo/__tests__/PersonalInfo.test.tsx +++ b/src/pages/PersonalInfoPage/__tests__/PersonalInfo.test.tsx @@ -1,4 +1,4 @@ -import PersonalInfo from "../PersonalInfo"; +import PersonalInfoPage from "../PersonalInfoPage"; import { render, fireEvent } from "@testing-library/react"; import type { PassengerData } from "../../../interfaces/passenger.interface"; @@ -34,7 +34,7 @@ jest.mock("../../../util/test-data.util", () => ({ describe("Tabs Tests", () => { /**************************FIRST TEST*******************************/ test("Test tabs", () => { - const tab = render(); + const tab = render(); // Check that the tabs render expect(tab).toBeTruthy(); @@ -77,7 +77,7 @@ describe("Tabs Tests", () => { }); test("Test snapshots", () => { - const { container } = render(); + const { container } = render(); expect(container).toMatchSnapshot(); }); }); diff --git a/src/pages/PersonalInfo/__tests__/__snapshots__/PersonalInfo.test.tsx.snap b/src/pages/PersonalInfoPage/__tests__/__snapshots__/PersonalInfo.test.tsx.snap similarity index 100% rename from src/pages/PersonalInfo/__tests__/__snapshots__/PersonalInfo.test.tsx.snap rename to src/pages/PersonalInfoPage/__tests__/__snapshots__/PersonalInfo.test.tsx.snap diff --git a/src/pages/RequestFlight/RequestFlight.tsx b/src/pages/RequestFlight/RequestFlight.tsx deleted file mode 100644 index 3e5d0e6..0000000 --- a/src/pages/RequestFlight/RequestFlight.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import FlightTimeSelector from "../../components/FlightTimeSelector/FlightTimeSelector"; - -const RequestFlight = () => { - // Request flight tab - console.log("RequestFlight"); - - return ( -
- -
- ); -}; - -export default RequestFlight; diff --git a/src/pages/RequestFlightPage/RequestFlightPage.tsx b/src/pages/RequestFlightPage/RequestFlightPage.tsx new file mode 100644 index 0000000..f0782cf --- /dev/null +++ b/src/pages/RequestFlightPage/RequestFlightPage.tsx @@ -0,0 +1,14 @@ +import FlightTimeSelector from "./components/FlightTimeSelector/FlightTimeSelector"; + +const RequestFlightPage = () => { + // Request flight tab + console.log("RequestFlight"); + + return ( +
+ +
+ ); +}; + +export default RequestFlightPage; diff --git a/src/components/FlightTimeSelector/FlightTimeSelector.definitions.ts b/src/pages/RequestFlightPage/components/FlightTimeSelector/FlightTimeSelector.definitions.ts similarity index 100% rename from src/components/FlightTimeSelector/FlightTimeSelector.definitions.ts rename to src/pages/RequestFlightPage/components/FlightTimeSelector/FlightTimeSelector.definitions.ts diff --git a/src/components/FlightTimeSelector/FlightTimeSelector.module.css b/src/pages/RequestFlightPage/components/FlightTimeSelector/FlightTimeSelector.module.css similarity index 100% rename from src/components/FlightTimeSelector/FlightTimeSelector.module.css rename to src/pages/RequestFlightPage/components/FlightTimeSelector/FlightTimeSelector.module.css diff --git a/src/components/FlightTimeSelector/FlightTimeSelector.tsx b/src/pages/RequestFlightPage/components/FlightTimeSelector/FlightTimeSelector.tsx similarity index 98% rename from src/components/FlightTimeSelector/FlightTimeSelector.tsx rename to src/pages/RequestFlightPage/components/FlightTimeSelector/FlightTimeSelector.tsx index fb2f56e..ad30aa0 100644 --- a/src/components/FlightTimeSelector/FlightTimeSelector.tsx +++ b/src/pages/RequestFlightPage/components/FlightTimeSelector/FlightTimeSelector.tsx @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import styles from "./FlightTimeSelector.module.css"; import "react-calendar/dist/Calendar.css"; -import Icon from "../CustomIcon/Icon.tsx"; +import Icon from "../../../../components/CustomIcon/Icon.tsx"; import DatePicker from "react-calendar"; import { useState } from "react"; import type { DateValue, FormTypes } from "./FlightTimeSelector.definitions.ts"; diff --git a/src/components/FlightTimeSelector/__tests__/FlightTimeSelector.test.tsx b/src/pages/RequestFlightPage/components/FlightTimeSelector/__tests__/FlightTimeSelector.test.tsx similarity index 100% rename from src/components/FlightTimeSelector/__tests__/FlightTimeSelector.test.tsx rename to src/pages/RequestFlightPage/components/FlightTimeSelector/__tests__/FlightTimeSelector.test.tsx diff --git a/src/pages/SignIn/SignIn.tsx b/src/pages/SignInPage/SignInPage.tsx similarity index 58% rename from src/pages/SignIn/SignIn.tsx rename to src/pages/SignInPage/SignInPage.tsx index 958e70a..1494b83 100644 --- a/src/pages/SignIn/SignIn.tsx +++ b/src/pages/SignInPage/SignInPage.tsx @@ -1,8 +1,8 @@ -const SignIn = () => { +const SignInPage = () => { // Sign in page console.log("SignIn"); return
SignIn
; }; -export default SignIn; +export default SignInPage; diff --git a/src/pages/SignUp/SignUp.tsx b/src/pages/SignUpPage/SignUpPage.tsx similarity index 58% rename from src/pages/SignUp/SignUp.tsx rename to src/pages/SignUpPage/SignUpPage.tsx index da8c345..e8f6c93 100644 --- a/src/pages/SignUp/SignUp.tsx +++ b/src/pages/SignUpPage/SignUpPage.tsx @@ -1,8 +1,8 @@ -const SignUp = () => { +const SignUpPage = () => { // Sign in page console.log("SignUp"); return
SignUp
; }; -export default SignUp; +export default SignUpPage; diff --git a/src/pages/MyFlights/MyFlights.module.css b/src/pages/TripsPage/TripsPage.module.css similarity index 100% rename from src/pages/MyFlights/MyFlights.module.css rename to src/pages/TripsPage/TripsPage.module.css diff --git a/src/pages/MyFlights/MyFlights.tsx b/src/pages/TripsPage/TripsPage.tsx similarity index 96% rename from src/pages/MyFlights/MyFlights.tsx rename to src/pages/TripsPage/TripsPage.tsx index edb2a22..ab2e38d 100644 --- a/src/pages/MyFlights/MyFlights.tsx +++ b/src/pages/TripsPage/TripsPage.tsx @@ -1,10 +1,10 @@ -import styles from "./MyFlights.module.css"; -import FlightTicket from "../../components/FlightTicket/FlightTicket"; +import styles from "./TripsPage.module.css"; +import FlightTicket from "./components/FlightTicket/FlightTicket"; import { createTestFlightLegData } from "../../util/test-data.util"; import { formatTimeFrame } from "../../util/date.util"; import type { FlightLegData } from "../../interfaces/flight-leg.interface"; -const MyFlights = () => { +const TripsPage = () => { /** * Processes the flights by filtering, sorting, and grouping them by request. * @@ -117,4 +117,4 @@ const MyFlights = () => { ); }; -export default MyFlights; +export default TripsPage; diff --git a/src/modals/FlightDetailsModal/FlightDetailsModal.definitions.tsx b/src/pages/TripsPage/components/FlightDetailsModal/FlightDetailsModal.definitions.tsx similarity index 53% rename from src/modals/FlightDetailsModal/FlightDetailsModal.definitions.tsx rename to src/pages/TripsPage/components/FlightDetailsModal/FlightDetailsModal.definitions.tsx index d6a1d62..af7f1fd 100644 --- a/src/modals/FlightDetailsModal/FlightDetailsModal.definitions.tsx +++ b/src/pages/TripsPage/components/FlightDetailsModal/FlightDetailsModal.definitions.tsx @@ -1,4 +1,4 @@ -import type { FlightLegData } from "../../interfaces/flight-leg.interface"; +import type { FlightLegData } from "../../../../interfaces/flight-leg.interface"; export interface FlightDetailsModalProps { onClose: () => void; diff --git a/src/modals/FlightDetailsModal/FlightDetailsModal.module.css b/src/pages/TripsPage/components/FlightDetailsModal/FlightDetailsModal.module.css similarity index 100% rename from src/modals/FlightDetailsModal/FlightDetailsModal.module.css rename to src/pages/TripsPage/components/FlightDetailsModal/FlightDetailsModal.module.css diff --git a/src/modals/FlightDetailsModal/FlightDetailsModal.tsx b/src/pages/TripsPage/components/FlightDetailsModal/FlightDetailsModal.tsx similarity index 100% rename from src/modals/FlightDetailsModal/FlightDetailsModal.tsx rename to src/pages/TripsPage/components/FlightDetailsModal/FlightDetailsModal.tsx diff --git a/src/modals/FlightDetailsModal/__tests__/FlightDetailsModal.test.tsx b/src/pages/TripsPage/components/FlightDetailsModal/__tests__/FlightDetailsModal.test.tsx similarity index 91% rename from src/modals/FlightDetailsModal/__tests__/FlightDetailsModal.test.tsx rename to src/pages/TripsPage/components/FlightDetailsModal/__tests__/FlightDetailsModal.test.tsx index 0d9b95b..f802b30 100644 --- a/src/modals/FlightDetailsModal/__tests__/FlightDetailsModal.test.tsx +++ b/src/pages/TripsPage/components/FlightDetailsModal/__tests__/FlightDetailsModal.test.tsx @@ -1,4 +1,4 @@ -import { createTestFlightLegData } from "../../../util/test-data.util"; +import { createTestFlightLegData } from "../../../../../util/test-data.util"; import FlightDetailsModal from "../FlightDetailsModal"; import { fireEvent, render } from "@testing-library/react"; diff --git a/src/components/FlightTicket/FlightTicket.definitions.tsx b/src/pages/TripsPage/components/FlightTicket/FlightTicket.definitions.tsx similarity index 77% rename from src/components/FlightTicket/FlightTicket.definitions.tsx rename to src/pages/TripsPage/components/FlightTicket/FlightTicket.definitions.tsx index 7bec53d..8b5eb38 100644 --- a/src/components/FlightTicket/FlightTicket.definitions.tsx +++ b/src/pages/TripsPage/components/FlightTicket/FlightTicket.definitions.tsx @@ -1,6 +1,6 @@ /* eslint-disable autofix/no-unused-vars */ -import type { FlightLegData } from "../../interfaces/flight-leg.interface"; +import type { FlightLegData } from "../../../../interfaces/flight-leg.interface"; export interface FlightTicketProps { flight: FlightLegData; diff --git a/src/components/FlightTicket/FlightTicket.module.css b/src/pages/TripsPage/components/FlightTicket/FlightTicket.module.css similarity index 100% rename from src/components/FlightTicket/FlightTicket.module.css rename to src/pages/TripsPage/components/FlightTicket/FlightTicket.module.css diff --git a/src/components/FlightTicket/FlightTicket.tsx b/src/pages/TripsPage/components/FlightTicket/FlightTicket.tsx similarity index 89% rename from src/components/FlightTicket/FlightTicket.tsx rename to src/pages/TripsPage/components/FlightTicket/FlightTicket.tsx index 0634a0b..cc04215 100644 --- a/src/components/FlightTicket/FlightTicket.tsx +++ b/src/pages/TripsPage/components/FlightTicket/FlightTicket.tsx @@ -1,10 +1,10 @@ import styles from "./FlightTicket.module.css"; import { FlightTicketColorVariant, LegType } from "./FlightTicket.definitions"; -import Tag from "../TagComponent/Tag"; -import { TagColor } from "../TagComponent/Tag.definitions"; -import FlightDetailsModal from "../../modals/FlightDetailsModal/FlightDetailsModal"; -import { formatDate } from "../../util/date.util"; -import { formatAirlineString } from "../../util/flight.util"; +import Tag from "../../../../components/TagComponent/Tag"; +import { TagColor } from "../../../../components/TagComponent/Tag.definitions"; +import FlightDetailsModal from "../FlightDetailsModal/FlightDetailsModal"; +import { formatDate } from "../../../../util/date.util"; +import { formatAirlineString } from "../../../../util/flight.util"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faCircleArrowRight, diff --git a/src/components/FlightTicket/__tests__/FlightTicket.test.tsx b/src/pages/TripsPage/components/FlightTicket/__tests__/FlightTicket.test.tsx similarity index 96% rename from src/components/FlightTicket/__tests__/FlightTicket.test.tsx rename to src/pages/TripsPage/components/FlightTicket/__tests__/FlightTicket.test.tsx index 81c2245..38d3d91 100644 --- a/src/components/FlightTicket/__tests__/FlightTicket.test.tsx +++ b/src/pages/TripsPage/components/FlightTicket/__tests__/FlightTicket.test.tsx @@ -1,6 +1,6 @@ -import { formatDate } from "../../../util/date.util"; -import { formatAirlineString } from "../../../util/flight.util"; -import { createTestFlightLegData } from "../../../util/test-data.util"; +import { formatDate } from "../../../../../util/date.util"; +import { formatAirlineString } from "../../../../../util/flight.util"; +import { createTestFlightLegData } from "../../../../../util/test-data.util"; import FlightTicket from "../FlightTicket"; import { FlightTicketColorVariant } from "../FlightTicket.definitions"; import { render } from "@testing-library/react";