Skip to content

Commit

Permalink
Merge pull request #329 from ertush/hotfix
Browse files Browse the repository at this point in the history
Fixed build error in BasicDetailsForm.js left-hand side of an assignm…
  • Loading branch information
ertush authored Feb 27, 2024
2 parents 7174938 + 31a9585 commit b741104
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions components/Forms/BasicDetailsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

Expand Down Expand Up @@ -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;

}

Expand Down

0 comments on commit b741104

Please sign in to comment.