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