Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add bed notification #8632

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/Components/Facility/AddBedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@
const { res } = await request(routes.createFacilityBed, {
body: { ...data, facility: facilityId, location: locationId },
});
res?.ok && onSuccess("Bed(s) created successfully");
res?.ok && (numberOfBeds>1

Check failure on line 130 in src/Components/Facility/AddBedForm.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `·(numberOfBeds>1·⏎` with `⏎········(numberOfBeds·>·1⏎··`
? onSuccess(t("multiple_bed_created_notification"))
: onSuccess(t("single_bed_created_notification")))

Check failure on line 132 in src/Components/Facility/AddBedForm.tsx

View workflow job for this annotation

GitHub Actions / lint

Replace `:·onSuccess(t("single_bed_created_notification")))` with `··:·onSuccess(t("single_bed_created_notification")));`
}
};

Expand Down
4 changes: 3 additions & 1 deletion src/Locale/en/Bed.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@
"bed_type": "Bed Type",
"make_multiple_beds_label": "Do you want to make multiple beds?",
"number_of_beds": "Number of beds",
"number_of_beds_out_of_range_error": "Number of beds cannot be greater than 100"
"number_of_beds_out_of_range_error": "Number of beds cannot be greater than 100",
"single_bed_created_notification": "Bed created successfully",
"multiple_bed_created_notification": "Beds created successfully"
}
Loading