diff --git a/src/Components/PatientForm/OtherDetails8.tsx b/src/Components/PatientForm/OtherDetails8.tsx index 3ad757c..fa5feda 100644 --- a/src/Components/PatientForm/OtherDetails8.tsx +++ b/src/Components/PatientForm/OtherDetails8.tsx @@ -24,9 +24,11 @@ interface Patient { pregnancy:string|undefined, menstralCycle: any, )=> void + patientDataDiplay:any; + type:string; } -export default function OtherDetails8({handleFormSection8Data}:Props){ +export default function OtherDetails8({handleFormSection8Data,patientDataDiplay,type}:Props){ const [patient, setPatient] = React.useState({ familyHistory: '', @@ -71,7 +73,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ multiline variant="outlined" label="" - name='explanation' + value={type=='display'?patientDataDiplay.familyHistory:patient.familyHistory} + disabled={type=='display'} onChange={(event:any) => { setPatient((prevValues) => ({ ...prevValues, @@ -86,6 +89,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ How do you sleep? { setPatient((prevValues) => ({ ...prevValues, @@ -93,9 +97,9 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ })); }} > - } label="Back" /> - } label="Side" /> - } label="Stomach" /> + } label="Back" /> + } label="Side" /> + } label="Stomach" /> @@ -105,6 +109,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ Do you use a pillow? { setPatient((prevValues) => ({ ...prevValues, @@ -112,8 +117,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ })); }} > - } label="Yes" /> - } label="No" /> + } label="Yes" /> + } label="No" /> @@ -123,6 +128,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ Do you wear orthotics or arch support? { setPatient((prevValues) => ({ ...prevValues, @@ -130,8 +136,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ })); }} > - } label="Yes" /> - } label="No" /> + } label="Yes" /> + } label="No" /> @@ -141,7 +147,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ { const formattedDate = formatDate(event) setPatient((prevValues) => ({ @@ -164,6 +171,7 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ Possible pregnancy? { setPatient((prevValues) => ({ ...prevValues, @@ -171,8 +179,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ })); }} > - } label="Yes" /> - } label="No" /> + } label="Yes" /> + } label="No" /> @@ -182,7 +190,8 @@ export default function OtherDetails8({handleFormSection8Data}:Props){ { const formattedDate = formatDate(event) setPatient((prevValues) => ({ diff --git a/src/Components/PatientForm/PatientForm.tsx b/src/Components/PatientForm/PatientForm.tsx index 184fcd5..c960bd5 100644 --- a/src/Components/PatientForm/PatientForm.tsx +++ b/src/Components/PatientForm/PatientForm.tsx @@ -486,7 +486,7 @@ export default function PatientForm({type}:Props){ @@ -497,7 +497,10 @@ export default function PatientForm({type}:Props){ - +