Update summary content with habitat and zone data

This commit is contained in:
Dana Lambert 2021-11-05 14:31:53 +13:00
parent 01a3328ec2
commit 11042b029a

View file

@ -21,7 +21,7 @@ export default function SummaryContent(props) {
const handleChange = (panel) => (event, isExpanded) => {
setExpanded(isExpanded ? panel : false);
};
};
React.useEffect(() => {
props.setNextDisabled(false);
@ -45,8 +45,10 @@ export default function SummaryContent(props) {
];
const siteData = [
createData('Habitat', ''),
createData('Zone', '')
createData('Habitat', props.filters.habitat.name ?? ""),
createData('Zone Name', (props.filters.zone && props.filters.zone.name) ?? ""),
createData('Zone Variant', (props.filters.zone && props.filters.zone.variant) ?? ""),
createData('Zone Refined Variant', (props.filters.zone && props.filters.zone.refined_variant) ?? "")
];
const projectSpecificsData = [
@ -66,7 +68,7 @@ export default function SummaryContent(props) {
<SummaryTable rows={locationData} />
</AccordionDetails>
</Accordion>
<Accordion expanded={expanded === 'panel2'} onChange={handleChange('panel2')} >
<Accordion expanded={expanded === 'panel2'} onChange={handleChange('panel2')} >
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
>
@ -76,7 +78,7 @@ export default function SummaryContent(props) {
<SummaryTable rows={soilData} />
</AccordionDetails>
</Accordion>
<Accordion expanded={expanded === 'panel3'} onChange={handleChange('panel3')} >
<Accordion expanded={expanded === 'panel3'} onChange={handleChange('panel3')} >
<AccordionSummary
expandIcon={<ExpandMoreIcon />}
>