Skip to content

Commit

Permalink
change display of childern names
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyjemutai committed Oct 16, 2024
1 parent ef348a2 commit 42763ba
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ export function PatientStatusBannerTag({ patientUuid }) {
{hivStatus === 'negative' && <Tag type="green">{t('hivNegative', 'HIV Negative')}</Tag>}

{/* Mother Name Display (if patient is under 10) */}
{patientAge !== null && patientAge <= 10 && motherName && <Tag type="purple">Mother: {motherName}</Tag>}
{patientAge !== null && patientAge <= 14 && motherName && <Tag type="purple">Mother: {motherName}</Tag>}

{/* Children Names Display (if patient is female and over 10) */}
{patientAge !== null && patientAge > 10 && patientGender === 'F' && childrenNames.length > 0 && (
<Tag type="purple">Children: {childrenNames.join(', ')}</Tag>
{patientAge !== null && patientAge > 14 && patientGender === 'F' && childrenNames.length > 0 && (
<Tag type="purple">Children: {childrenNames.join(' || ')}</Tag>
)}
</>
);
Expand Down

0 comments on commit 42763ba

Please sign in to comment.