diff --git a/src/pages/searchPatient.tsx b/src/pages/searchPatient.tsx index 1769639..02e5997 100644 --- a/src/pages/searchPatient.tsx +++ b/src/pages/searchPatient.tsx @@ -4,31 +4,25 @@ import { useRouter } from 'next/router' import styles from '../styles/searchPatient.module.scss'; import Link from "next/link"; -import { R4 } from "@ahryman40k/ts-fhir-types"; - const ChoosePatient: React.FC<{ clientLoading: boolean }> = ({ clientLoading }) => { const [patientId, setPatientId] = useState(""); const { client } = useContext(clientContext); const navigate = useRouter(); - const [loading, setLoading] = useState(false); - - - const renderEverything = (id: string) => - { - navigate.push(`/patient/${id}`); - } + // Search for active patient if any patient is active useEffect(() => { if (client?.patient?.id) { navigate.push(`/patient/${client.patient.id}`); } }, [client, navigate]); + + // Search for patient on pressed enter key const handleKeyDown = (event: KeyboardEvent) => { if (event.key === 'Enter') { - renderEverything(patientId) + navigate.push(`/patient/${patientId}`); } }; @@ -46,11 +40,11 @@ const ChoosePatient: React.FC<{ clientLoading: boolean }> = ({ clientLoading }) onKeyDown={(e) => handleKeyDown(e)} /> - - - + + + ); @@ -61,8 +55,11 @@ const ChoosePatient: React.FC<{ clientLoading: boolean }> = ({ clientLoading })

Missing access!

Please restart the app and allow access to all resources.

- + + +
); diff --git a/src/styles/conditions.scss b/src/styles/conditions.scss index 70910be..9f4e46a 100644 --- a/src/styles/conditions.scss +++ b/src/styles/conditions.scss @@ -34,12 +34,10 @@ } .conditions-list { - // max-height: 10%; padding: 0; margin: 0; list-style-type: none; - // height: 90%; overflow-y: scroll; scrollbar-width: thin; diff --git a/src/styles/searchPatient.module.scss b/src/styles/searchPatient.module.scss index 926315d..7644834 100644 --- a/src/styles/searchPatient.module.scss +++ b/src/styles/searchPatient.module.scss @@ -17,6 +17,7 @@ border-color: $dips-dark-blue; border-style: solid; border-width: 2px; + background-color: white; } .inputLabel { @@ -29,17 +30,19 @@ color: #262626; width: 300px; height: 40px; - border: 1px solid #b6b7b9; + border: 1px solid $neutral-black; border-radius: 0.50rem; outline: none; font-size: 18px; font-family: 'CircularStd'; margin-bottom: 40px; margin-top: 15px; -} + background-color: whitesmoke; -.inputField input:focus { - border-color: $dips-primary-blue; + &:focus { + background-color: white; + border: 1px solid $dips-primary-blue; + } } .dipsPrimaryButton {