feature/view-patient-data #7
@ -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) => (
|
||||
<MuiAccordion disableGutters elevation={0} square {...props} />
|
||||
@ -90,6 +91,7 @@ export default function PatientForm({ type }: Props) {
|
||||
const [section7Data, setSection7Data] = React.useState<any>({});
|
||||
const [section8Data, setSection8Data] = React.useState<any>({});
|
||||
const [allPatientData, setAllPatientData] = React.useState<any>([]);
|
||||
const [patientDetailsButtonFlag, setPatientDetailsButtonFlag ] = React.useState<boolean>(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) {
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid container flexDirection={'row-reverse'}>
|
||||
{patientDetailsButtonFlag && type!=='display'?
|
||||
<Grid item>
|
||||
<Button
|
||||
variant='contained'
|
||||
color='primary'
|
||||
sx={{ margin: 5, width: '200px' }}
|
||||
onClick={(e)=>{
|
||||
|
||||
}}
|
||||
component={Link}
|
||||
to='/view-details'
|
||||
>
|
||||
View Patient Details
|
||||
</Button>
|
||||
</Grid>:null}
|
||||
|
||||
{type=='display'?
|
||||
<Grid item>
|
||||
<Button
|
||||
variant='contained'
|
||||
color='primary'
|
||||
sx={{ margin: 5, width: '200px' }}
|
||||
onClick={(e)=>{
|
||||
|
||||
}}
|
||||
component={Link}
|
||||
to='/'
|
||||
>
|
||||
New Patient Form
|
||||
</Button>
|
||||
</Grid>:null}
|
||||
|
||||
<Grid item>
|
||||
<Button
|
||||
// type="submit"
|
||||
variant='contained'
|
||||
color='primary'
|
||||
sx={{ margin: 5, width: '200px' }}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user