Skip to content

Commit

Permalink
Refactor TransferPatientDialog component to display patient name in s…
Browse files Browse the repository at this point in the history
…uccess notification (#6829)
  • Loading branch information
konavivekramakrishna authored Dec 13, 2023
1 parent bd4dd95 commit e292fb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Components/Facility/TransferPatientDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,11 @@ const TransferPatientDialog = (props: Props) => {
if (res && res.data && res.status === 200) {
dispatch({ type: "set_form", form: initForm });
handleOk();

const patientName =
patientOptions.find((p) => p.id === state.form.patient)?.text || "";
Notification.Success({
msg: `Patient ${res.data.patient} transferred successfully`,
msg: `Patient ${patientName} transferred successfully`,
});
const newFacilityId =
res.data && res.data.facility_object && res.data.facility_object.id;
Expand Down

0 comments on commit e292fb7

Please sign in to comment.