Skip to content

Commit

Permalink
feat(patient): refactor add allergy button
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Tan authored and Alex Tan committed Sep 28, 2020
1 parent af1aa0c commit 4b234a1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/patients/view/ImportantPatientInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const ImportantPatientInfo = (props: Props) => {
color: 'black',
backgroundColor: 'rgba(245,245,245,1)',
fontSize: 'small',
padding: '10px',
}

const tableStyle: CSSProperties = {
Expand All @@ -61,9 +62,9 @@ const ImportantPatientInfo = (props: Props) => {

const addAllergyButtonStyle: CSSProperties = {
fontSize: 'small',
position: 'absolute',
top: '0px',
right: '0px',
position: 'relative',
top: '5px',
bottom: '5px',
}

return (
Expand Down Expand Up @@ -138,6 +139,7 @@ const ImportantPatientInfo = (props: Props) => {
<Typography variant="h5">{t('patient.diagnoses.label')}</Typography>
<div className="border border-primary" style={tableStyle}>
<Table
onRowClick={() => history.push(`/patients/${patient.id}/diagnoses`)}
getID={(row) => row.id}
columns={[
{ label: t('patient.diagnoses.diagnosisName'), key: 'name' },
Expand All @@ -149,6 +151,7 @@ const ImportantPatientInfo = (props: Props) => {
? format(new Date(row.diagnosisDate), 'yyyy-MM-dd hh:mm a')
: '',
},
{ label: t('patient.diagnoses.status'), key: 'status' },
]}
data={patient.diagnoses ? (patient.diagnoses as Diagnosis[]) : []}
/>
Expand Down

0 comments on commit 4b234a1

Please sign in to comment.