From 98df5a28252429cbdd2282c8053cf2ba476d0b5d Mon Sep 17 00:00:00 2001 From: sonika <> Date: Wed, 13 Sep 2023 21:40:03 +0530 Subject: [PATCH] view and new patient button --- src/Components/PatientForm/PatientForm.tsx | 42 +++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/Components/PatientForm/PatientForm.tsx b/src/Components/PatientForm/PatientForm.tsx index 7de17cf..bc4216e 100644 --- a/src/Components/PatientForm/PatientForm.tsx +++ b/src/Components/PatientForm/PatientForm.tsx @@ -35,6 +35,7 @@ import PatientImageMarker from '../ImageMarker/PatientImageMarker'; import ViewPatientImageMarker from '../ImageMarker/ViewPatientImageMarker'; import AlertDialog from '../Helper/AlertDialogBox'; import SignatureComponent from '../Helper/SignatureComponent'; +import { Link, useLocation } from 'react-router-dom'; const Accordion = styled((props: AccordionProps) => ( @@ -90,6 +91,7 @@ export default function PatientForm({ type }: Props) { const [section7Data, setSection7Data] = React.useState({}); const [section8Data, setSection8Data] = React.useState({}); const [allPatientData, setAllPatientData] = React.useState([]); + const [patientDetailsButtonFlag, setPatientDetailsButtonFlag ] = React.useState(false) const handleFormSection1Data = ( fullName?: string | undefined, @@ -373,6 +375,13 @@ export default function PatientForm({ type }: Props) { section1Data.mailingAddress !== '' ) { TextFile(); + setPatientDetailsButtonFlag(true) + setAlertProps({ + open: true, + severity: 'success', + message: 'The patient details have been submitted!', + duration: 5000, + }); } else { setAlertProps({ open: true, @@ -699,9 +708,40 @@ export default function PatientForm({ type }: Props) { + {patientDetailsButtonFlag && type!=='display'? + + + :null} + + {type=='display'? + + + :null} +