From 3dabcc329d945acb8e77542ae305c9b20c536165 Mon Sep 17 00:00:00 2001 From: Donald Kibet Date: Tue, 20 Aug 2024 23:12:11 +0300 Subject: [PATCH] (feat) : enhance registry UI and add null check for obs concept (#40) --- .../field/obs/obs-field.component.tsx | 2 +- .../patient-verification-hook.tsx | 2 +- .../patient-verification.component.tsx | 3 +++ .../patient-verification.scss | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx index 6e4881511..48ebb6b5a 100644 --- a/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx +++ b/packages/esm-patient-registration-app/src/patient-registration/field/obs/obs-field.component.tsx @@ -33,7 +33,7 @@ export function ObsField({ fieldDefinition }: ObsFieldProps) { return null; } - switch (concept.datatype.display) { + switch (concept?.datatype?.display) { case 'Text': return ( = ({ props }) => {

{t('clientVerificationWithClientRegistry', 'Client verification with client registry')}

+ + {t('allFieldsRequiredText', 'All fields are required unless marked optional')} +
{isLoading && } diff --git a/packages/esm-patient-registration-app/src/patient-verification/patient-verification.scss b/packages/esm-patient-registration-app/src/patient-verification/patient-verification.scss index 044c03564..10291355c 100644 --- a/packages/esm-patient-registration-app/src/patient-verification/patient-verification.scss +++ b/packages/esm-patient-registration-app/src/patient-verification/patient-verification.scss @@ -1,4 +1,7 @@ @use '@carbon/colors'; +@use '@carbon/layout'; +@use '@carbon/type'; +@use '@openmrs/esm-styleguide/src/vars' as *; @import '../patient-registration/patient-registration.scss'; /* Desktop */ @@ -23,3 +26,16 @@ .errorWrapper { margin: 0 0 1rem 0; } + +.label01 { + @include type.type-style('label-01'); + margin-top: layout.$spacing-05; + margin-bottom: layout.$spacing-05; + color: $ui-04; +} + +.productiveHeading02 { + @include type.type-style('heading-compact-02'); + color: $ui-04; + cursor: pointer; +}