From 61cd66a145087d847fdc9c230c04b8c35e7e92eb Mon Sep 17 00:00:00 2001 From: PepperyMonk6 <86257074+PepperyMonk6@users.noreply.github.com> Date: Mon, 1 Apr 2024 18:56:16 +0300 Subject: [PATCH] changes to the customer dashboard and register page --- .../CustomerDashboard/CustomerDashboard.scss | 15 +++++++++++++++ .../CustomerDashboard/CustomerDashboard.tsx | 13 ++++++++----- client/src/components/Register/Register.tsx | 9 +++++++++ 3 files changed, 32 insertions(+), 5 deletions(-) diff --git a/client/src/components/CustomerDashboard/CustomerDashboard.scss b/client/src/components/CustomerDashboard/CustomerDashboard.scss index 559bc05..def2dfb 100644 --- a/client/src/components/CustomerDashboard/CustomerDashboard.scss +++ b/client/src/components/CustomerDashboard/CustomerDashboard.scss @@ -102,4 +102,19 @@ .view-more:hover { filter: brightness(50%); cursor: pointer; +} + +.view_more_button { + margin-left: 10px; + font-size: 1rem; + padding: 6px 12px; + border: 1px solid gray; + border-radius: 5px; + background-color: var(--main); + color: white; +} + +.view_more_button:hover { + filter: brightness(50%); + cursor: pointer; } \ No newline at end of file diff --git a/client/src/components/CustomerDashboard/CustomerDashboard.tsx b/client/src/components/CustomerDashboard/CustomerDashboard.tsx index 006b7dd..c89e523 100644 --- a/client/src/components/CustomerDashboard/CustomerDashboard.tsx +++ b/client/src/components/CustomerDashboard/CustomerDashboard.tsx @@ -97,7 +97,10 @@ function CustomerDashboard() { </div> <div className='flights'> - <span className='flights-title'>Upcoming Flights</span> + <div> + <span className='flights-title'>Upcoming Flights</span> + <button type='submit' className='view_more_button'>View more</button> + </div> <div className='flight-list'> {data.upcomingFlights.length > 0 ? data.upcomingFlights.map((flight) => { @@ -108,7 +111,10 @@ function CustomerDashboard() { </div> <div className='flights'> - <span className='flights-title'>Flights History</span> + <div> + <span className='flights-title'>Flights History</span> + <button type='submit' className='view_more_button'>View more</button> + </div> <div className='flight-list'> {data.upcomingFlights.length > 0 ? data.flightsHistory.map((flight) => { @@ -116,9 +122,6 @@ function CustomerDashboard() { }) : <div>No Flights History</div>} </div> - <div> - <button type='button' className='view-more'>View More</button> - </div> </div> </div> </> diff --git a/client/src/components/Register/Register.tsx b/client/src/components/Register/Register.tsx index 8c216b6..933ab0c 100644 --- a/client/src/components/Register/Register.tsx +++ b/client/src/components/Register/Register.tsx @@ -7,6 +7,7 @@ interface IRegister { email: string; password: string; confirmPassword: string; + customerType: string; } export function Register() { @@ -53,6 +54,14 @@ export function Register() { <input type='password' placeholder='Confirm password' {...register('confirmPassword', { required: true })} /> </div> + <div className='form-group'> + <label>Customer Type</label> + <select {...register('customerType', { required: true })}> + <option value="Customer">Customer</option> + <option value="Airline">Airline</option> + </select> + </div> + <div className='form-group'> <button type='submit'>Submit</button> </div> -- GitLab