From 31a9585d8f487303c89b53c36d4102b1ce303524 Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 27 Feb 2024 13:44:06 +0300 Subject: [PATCH] Fixed build error in BasicDetailsForm.js left-hand side of an assignment expression error --- components/Forms/BasicDetailsForm.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/components/Forms/BasicDetailsForm.js b/components/Forms/BasicDetailsForm.js index 2e56f45b..10c212be 100644 --- a/components/Forms/BasicDetailsForm.js +++ b/components/Forms/BasicDetailsForm.js @@ -88,28 +88,28 @@ export function BasicDeatilsForm({ editMode }) { if (facilityTypeLabel.includes('DISPENSARY')) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 2')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 2')?.value; } else if (facilityTypeLabel.includes('MEDICAL CENTER')) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 3')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 3')?.value; } else if (facilityTypeLabel.includes('HEALTH CENTRE')) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 3')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 3')?.value; } else if (facilityTypeLabel.includes('MEDICAL CLINIC')) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 2')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 2')?.value; } else if (facilityTypeLabel.includes('NURSING HOME')) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 3')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 3')?.value; } else if (facilityTypeLabel.includes('STAND ALONE')) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 2')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 2')?.value; } @@ -154,17 +154,17 @@ export function BasicDeatilsForm({ editMode }) { if (facilityTypeLabel.trim().toLowerCase() == 'Comprehensive Teaching & Tertiary Referral Hospital'.trim().toLowerCase()) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 6')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 6')?.value; } else if (facilityTypeLabel.trim().toLowerCase() == 'Specialized & Tertiary Referral hospitals'.trim().toLowerCase()) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 6')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 6')?.value; } else if (facilityTypeLabel.trim().toLowerCase() == 'Secondary care hospitals'.trim().toLowerCase()) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 5')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 5')?.value; } else if (facilityTypeLabel.trim().toLowerCase() == 'Primary care hospitals'.trim().toLowerCase()) { - keph[0]?.value = options?.keph.find(({ label }) => label == 'Level 4')?.value; + keph[0]['value'] = options?.keph.find(({ label }) => label == 'Level 4')?.value; }