Skip to content

Commit

Permalink
Fixed update button in bed management. (#6841)
Browse files Browse the repository at this point in the history
* change update bed logic

* Update src/Components/Facility/AddBedForm.tsx

---------

Co-authored-by: Rithvik Nishad <[email protected]>
  • Loading branch information
AshrafMd-1 and rithviknishad authored Dec 14, 2023
1 parent 5b0bca7 commit 27e19cc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Components/Facility/AddBedForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { Cancel, Submit } from "../Common/components/ButtonV2";
import TextFormField from "../Form/FormFields/TextFormField";
import TextAreaFormField from "../Form/FormFields/TextAreaFormField";
import Page from "../Common/components/Page";

const Loading = lazy(() => import("../Common/Loading"));

interface BedFormProps {
Expand Down Expand Up @@ -73,6 +74,7 @@ export const AddBedForm = (props: BedFormProps) => {
}
setIsLoading(false);
}

fetchFacilityLocationAndBed();
}, [dispatchAction, facilityId, locationId]);

Expand Down Expand Up @@ -125,7 +127,7 @@ export const AddBedForm = (props: BedFormProps) => {
name,
description,
bed_type: bedType,
number_of_beds: numberOfBeds,
number_of_beds: bedId ? 1 : numberOfBeds,
};

if (!validateInputs(data)) return;
Expand Down

0 comments on commit 27e19cc

Please sign in to comment.