From 5f8f5545ddf5b887a50b3b6232e60ac99b407e09 Mon Sep 17 00:00:00 2001 From: Mathew Hany Date: Mon, 13 Nov 2023 15:22:40 +0200 Subject: [PATCH] Small styling tweaks --- frontend/src/components/BaseLayout.tsx | 9 +++++++-- .../src/features/doctor-dashboard/routes/Patient.tsx | 8 ++++++-- frontend/src/features/doctor-dashboard/routes/Wallet.tsx | 2 +- .../routes/viewPatientMedicalHistory.tsx | 2 +- .../src/features/patient-dashboard/routes/Wallet.tsx | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/BaseLayout.tsx b/frontend/src/components/BaseLayout.tsx index 60d35e76..f150d384 100644 --- a/frontend/src/components/BaseLayout.tsx +++ b/frontend/src/components/BaseLayout.tsx @@ -14,7 +14,7 @@ import { IconButton, } from '@mui/material' import React from 'react' -import { Link, Outlet } from 'react-router-dom' +import { Link, Outlet, useLocation } from 'react-router-dom' import { OnlyAuthenticated } from './OnlyAuthenticated' import { LocalizationProvider } from '@mui/x-date-pickers' import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs' @@ -28,10 +28,15 @@ interface ListItemLinkProps { function ListItemLink(props: ListItemLinkProps) { const { icon, primary, to } = props + const location = useLocation() return (
  • - + {icon ? {icon} : null} diff --git a/frontend/src/features/doctor-dashboard/routes/Patient.tsx b/frontend/src/features/doctor-dashboard/routes/Patient.tsx index bcfc21b5..4630d421 100644 --- a/frontend/src/features/doctor-dashboard/routes/Patient.tsx +++ b/frontend/src/features/doctor-dashboard/routes/Patient.tsx @@ -138,8 +138,12 @@ export function Patient() { {`${prescription.medicine} - ${prescription.date.toString()}`} ))} + + {patient.prescriptions.length == 0 && ( + None + )} - + {/* showing screen capture - + */} Medical Records diff --git a/frontend/src/features/doctor-dashboard/routes/Wallet.tsx b/frontend/src/features/doctor-dashboard/routes/Wallet.tsx index 19618ae1..8d56167e 100644 --- a/frontend/src/features/doctor-dashboard/routes/Wallet.tsx +++ b/frontend/src/features/doctor-dashboard/routes/Wallet.tsx @@ -27,7 +27,7 @@ export function Wallet() { - {`Wallet Money: ${res.money} EGP`} + {`Wallet Money: ${res.money.toFixed(2)} EGP`} diff --git a/frontend/src/features/doctor-dashboard/routes/viewPatientMedicalHistory.tsx b/frontend/src/features/doctor-dashboard/routes/viewPatientMedicalHistory.tsx index 2ec09151..603a0e37 100644 --- a/frontend/src/features/doctor-dashboard/routes/viewPatientMedicalHistory.tsx +++ b/frontend/src/features/doctor-dashboard/routes/viewPatientMedicalHistory.tsx @@ -31,7 +31,7 @@ function ViewMedicalHistory() { component="h1" gutterBottom > - Health Records Files + Medical History Files {MedicalHistory.map((url, index) => ( diff --git a/frontend/src/features/patient-dashboard/routes/Wallet.tsx b/frontend/src/features/patient-dashboard/routes/Wallet.tsx index 9af1acb6..490ed71b 100644 --- a/frontend/src/features/patient-dashboard/routes/Wallet.tsx +++ b/frontend/src/features/patient-dashboard/routes/Wallet.tsx @@ -27,7 +27,7 @@ export function Wallet() { - {`Wallet Money: ${res.money} EGP`} + {`Wallet Money: ${res.money.toFixed(2)} EGP`}