Skip to content

Commit

Permalink
Changed some styling for searchPatient and commented a smidge
Browse files Browse the repository at this point in the history
  • Loading branch information
hellefigen committed Jun 26, 2024
1 parent e04ff0f commit 332e2a5
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 141 deletions.
240 changes: 120 additions & 120 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 9 additions & 15 deletions src/pages/searchPatient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<string>("");
const { client } = useContext(clientContext);
const navigate = useRouter();
const [loading, setLoading] = useState<boolean>(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<HTMLInputElement>) => {
if (event.key === 'Enter') {
renderEverything(patientId)
navigate.push(`/patient/${patientId}`);
}
};

Expand All @@ -46,11 +40,11 @@ const ChoosePatient: React.FC<{ clientLoading: boolean }> = ({ clientLoading })
onKeyDown={(e) => handleKeyDown(e)}
/>
</div>
<Link href={{ pathname: `/patient/${patientId}`}} className="default-link">
<button className={styles.dipsPrimaryButton} >
Submit
</button>
</Link>
<Link href={{ pathname: `/patient/${patientId}`}} className="default-link">
<button className={styles.dipsPrimaryButton} >
Submit
</button>
</Link>
</div>
</div>
);
Expand Down
2 changes: 0 additions & 2 deletions src/styles/conditions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
11 changes: 7 additions & 4 deletions src/styles/searchPatient.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
border-color: $dips-dark-blue;
border-style: solid;
border-width: 2px;
background-color: white;
}

.inputLabel {
Expand All @@ -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 {
Expand Down

0 comments on commit 332e2a5

Please sign in to comment.