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

Show notifications on prescription edit / failure #8049

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion src/Components/Form/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ const Form = <T extends FormDetails>({

if (validate) {
const errors = omitBy(validate(state.form), isEmpty) as FormErrors<T>;

if (Object.keys(errors).length) {
dispatch({ type: "set_errors", errors });

Expand Down
3 changes: 3 additions & 0 deletions src/Components/Medicine/EditPrescriptionForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ export default function EditPrescriptionForm(props: Props) {

if (success) {
props.onDone(true);
Notification.Success({ msg: "Prescription edited successfully" });
} else {
Notification.Error({ msg: "Failed to edit prescription" });
}
}}
noPadding
Expand Down
Loading