Skip to content

Commit

Permalink
(fix) O3-3196: Fix diagnoses tags display on tablet (openmrs#1834)
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed May 22, 2024
1 parent d0f194b commit 736c37a
Showing 1 changed file with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -386,45 +386,45 @@ const VisitNotesForm: React.FC<DefaultPatientWorkspaceProps> = ({
/>
</Column>
</Row>
<div className={styles.diagnosesText}>
{selectedPrimaryDiagnoses && selectedPrimaryDiagnoses.length ? (
<>
{selectedPrimaryDiagnoses.map((diagnosis, index) => (
<Tag
className={styles.tag}
filter
key={index}
onClose={() => handleRemoveDiagnosis(diagnosis, 'primaryInputSearch')}
type="red"
>
{diagnosis.display}
</Tag>
))}
</>
) : null}
{selectedSecondaryDiagnoses && selectedSecondaryDiagnoses.length ? (
<>
{selectedSecondaryDiagnoses.map((diagnosis, index) => (
<Tag
classname={styles.tag}
filter
key={index}
onClose={() => handleRemoveDiagnosis(diagnosis, 'secondaryInputSearch')}
type="blue"
>
{diagnosis.display}
</Tag>
))}
</>
) : null}
{selectedPrimaryDiagnoses &&
!selectedPrimaryDiagnoses.length &&
selectedSecondaryDiagnoses &&
!selectedSecondaryDiagnoses.length && (
<span>{t('emptyDiagnosisText', 'No diagnosis selected — Enter a diagnosis below')}</span>
)}
</div>
<Row className={styles.row}>
<div className={styles.diagnosesText}>
{selectedPrimaryDiagnoses && selectedPrimaryDiagnoses.length ? (
<>
{selectedPrimaryDiagnoses.map((diagnosis, index) => (
<Tag
className={styles.tag}
filter
key={index}
onClose={() => handleRemoveDiagnosis(diagnosis, 'primaryInputSearch')}
type="red"
>
{diagnosis.display}
</Tag>
))}
</>
) : null}
{selectedSecondaryDiagnoses && selectedSecondaryDiagnoses.length ? (
<>
{selectedSecondaryDiagnoses.map((diagnosis, index) => (
<Tag
classname={styles.tag}
filter
key={index}
onClose={() => handleRemoveDiagnosis(diagnosis, 'secondaryInputSearch')}
type="blue"
>
{diagnosis.display}
</Tag>
))}
</>
) : null}
{selectedPrimaryDiagnoses &&
!selectedPrimaryDiagnoses.length &&
selectedSecondaryDiagnoses &&
!selectedSecondaryDiagnoses.length && (
<span>{t('emptyDiagnosisText', 'No diagnosis selected — Enter a diagnosis below')}</span>
)}
</div>
<Column sm={1}>
<span className={styles.columnLabel}>{t('primaryDiagnosis', 'Primary diagnosis')}</span>
</Column>
Expand Down

0 comments on commit 736c37a

Please sign in to comment.