Skip to content

Commit

Permalink
fix: Add cancel button in delivery result and pregnant treatment type…
Browse files Browse the repository at this point in the history
…s forms
  • Loading branch information
SteveGT96 committed Dec 2, 2024
1 parent 10d8dce commit 940354e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Cancel } from "@mui/icons-material";
import { useFormik } from "formik";
import { useAppDispatch, useAppSelector } from "libraries/hooks/redux";
import { get, has } from "lodash";
Expand Down Expand Up @@ -130,6 +131,20 @@ const DeliveryResultTypeForm: FC<IDeliveryResultTypeFormProps> = ({

return (
<div className="deliveryResultTypesForm">
<div className="form__header">
<div className="form__actions">
<Button
dataCy="cancel-form"
onClick={handleCancelConfirmationDialog(true)}
type="button"
variant="contained"
color="primary"
>
<Cancel fontSize="small" />
{t("common.discard")}
</Button>
</div>
</div>
<form
className="deliveryResultTypesForm__form"
onSubmit={formik.handleSubmit}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Cancel } from "@mui/icons-material";
import { useFormik } from "formik";
import { useAppDispatch, useAppSelector } from "libraries/hooks/redux";
import { get, has } from "lodash";
Expand Down Expand Up @@ -130,6 +131,20 @@ const PregnantTreatmentTypeForm: FC<IPregnantTreatmentTypeFormProps> = ({

return (
<div className="pregnantTreatmentTypesForm">
<div className="form__header">
<div className="form__actions">
<Button
dataCy="cancel-form"
onClick={handleCancelConfirmationDialog(true)}
type="button"
variant="contained"
color="primary"
>
<Cancel fontSize="small" />
{t("common.discard")}
</Button>
</div>
</div>
<form
className="pregnantTreatmentTypesForm__form"
onSubmit={formik.handleSubmit}
Expand Down

0 comments on commit 940354e

Please sign in to comment.