Merge pull request 'display add table data' (#4) from feature/view-patient-data into develop
Reviewed-on: #4
This commit is contained in:
commit
b3b1843711
@ -13,7 +13,27 @@ interface DataTableProps {
|
||||
onAddRow: () => void;
|
||||
}
|
||||
|
||||
const DataTable: React.FC= () => {
|
||||
type Props={
|
||||
handleFormSection5Data:(
|
||||
generalHealth: string|undefined,
|
||||
presentProblemBefore: string|undefined,
|
||||
ifYespresentProblemBefore:string|undefined,
|
||||
ifYestreatmentProvided: string|undefined,
|
||||
ifYesOutcome: string|undefined,
|
||||
strokeBloodclotting: string|undefined,
|
||||
ifYesstrokeBloodclotting: string|undefined,
|
||||
dizzinessFetigue: string|undefined,
|
||||
ifyesdizzinessFetigue: string|undefined,
|
||||
antiColligent: string|undefined,
|
||||
injuriesHospitalization: string|undefined,
|
||||
supplementsOrDrugs: string|undefined,
|
||||
)=> void
|
||||
patientDataDiplay:any;
|
||||
type:string;
|
||||
|
||||
}
|
||||
|
||||
function DataTable({handleFormSection5Data,patientDataDiplay,type}:Props) {
|
||||
|
||||
const [illnessFromData, setIllnessFromData] = React.useState<any>({
|
||||
id:0,date:'',illness:'',treatment:'',results:''
|
||||
@ -50,12 +70,10 @@ const DataTable: React.FC= () => {
|
||||
}
|
||||
};
|
||||
|
||||
console.log("sdfsdfdsf",illnessData, illnessFromData)
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<FormLabel>If yes, Please enter the details below:</FormLabel><br></br>
|
||||
{type!=="display"?
|
||||
<FormControl>
|
||||
<Grid container spacing={1.5} sx={{width:750, marginTop:1}}>
|
||||
<Grid item xs={2} className='addNew-form-table-style'>
|
||||
@ -120,6 +138,7 @@ const DataTable: React.FC= () => {
|
||||
|
||||
</Grid>
|
||||
</FormControl>
|
||||
:""}
|
||||
|
||||
|
||||
<TableContainer sx={{width:800}} className='illness-table-style'>
|
||||
@ -149,9 +168,12 @@ const DataTable: React.FC= () => {
|
||||
{row.results}
|
||||
</TableCell>
|
||||
<TableCell align='left'>
|
||||
<Button sx={{height:'30x',width:20, bgcolor:'skyblue'}} onClick={(e)=>{deleteIllnessData(row.id)}}>
|
||||
{type!=="display"?
|
||||
<Button sx={{height:'30x',width:20, bgcolor:'skyblue'}}
|
||||
onClick={(e)=>{deleteIllnessData(row.id)}}>
|
||||
Delete
|
||||
</Button>
|
||||
:""}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))}
|
||||
|
||||
@ -281,7 +281,10 @@ export default function PastTreatment5({handleFormSection5Data,patientDataDiplay
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={12} sx={{marginLeft:2, marginBottom:3}} >
|
||||
<Table />
|
||||
<Table
|
||||
handleFormSection5Data={handleFormSection5Data}
|
||||
patientDataDiplay={patientDataDiplay}
|
||||
type={type}/>
|
||||
</Grid>
|
||||
|
||||
<Grid item xs={6} className='collapsable-form-style-multiline'>
|
||||
|
||||
@ -389,6 +389,8 @@ export default function PatientForm({type}:Props){
|
||||
//@ts-ignore
|
||||
const patientData = localStorage.getItem('patientData') ? JSON.parse(localStorage.getItem('patientData')) : [];
|
||||
|
||||
console.log("dfsdfdsf",patientData)
|
||||
|
||||
return(
|
||||
<>
|
||||
{alertProps && alertProps.open && (
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user