rewrite organisation of planning menu

This commit is contained in:
Mateusz Konieczny 2022-11-28 11:26:57 +01:00
parent 9c4f7e0ee8
commit 8c134968a9

View File

@ -51,29 +51,14 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
return ( return (
<Fragment> <Fragment>
<DataEntryGroup name="Planning application information" collapsed={false} > <DataEntryGroup name="Planning application information" collapsed={false} >
<DataEntryGroup name="Active applications (official data)" collapsed={false} > <DataEntryGroup name="Current/active applications (official data)" collapsed={false} >
<PlanningDataOfficialDataEntry <PlanningDataOfficialDataEntry
shownData={props.building.planning_data ? props.building.planning_data.filter(item => isArchived(item) == false) : []} shownData={props.building.planning_data ? props.building.planning_data.filter(item => isArchived(item) == false) : []}
allEntryCount={props.building.planning_data ? props.building.planning_data.length : 0} allEntryCount={props.building.planning_data ? props.building.planning_data.length : 0}
/> />
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Past applications (official data)" collapsed={true} > <DataEntryGroup name="Other active application info (crowdsourced data)" collapsed={true} >
<InfoBox type='warning'> <NumericDataEntry
Past applications, including those with no decision in over a year
</InfoBox>
<PlanningDataOfficialDataEntry
shownData={props.building.planning_data ? props.building.planning_data.filter(item => isArchived(item)) : []}
allEntryCount={props.building.planning_data ? props.building.planning_data.length : 0}
/>
</DataEntryGroup>
<DataEntryGroup name="Crowdsourced info on planning applications" collapsed={true} >
<CheckboxDataEntry
title="Has the work on this site been completed?"
slug="planning_live_application"
value={null}
disabled={false}
/>
<NumericDataEntry
title={"Year of completion"} title={"Year of completion"}
slug="date_year" slug="date_year"
value={2019} value={2019}
@ -85,6 +70,17 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
// "type": "year_estimator" // "type": "year_estimator"
/> />
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Past applications (official data)" collapsed={true} >
<InfoBox type='warning'>
Past applications, including those with no decision in over a year
</InfoBox>
<PlanningDataOfficialDataEntry
shownData={props.building.planning_data ? props.building.planning_data.filter(item => isArchived(item)) : []}
allEntryCount={props.building.planning_data ? props.building.planning_data.length : 0}
/>
</DataEntryGroup>
<DataEntryGroup name="Possible future applications (crowdsourced data)" collapsed={true} >
</DataEntryGroup>
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Planning contraints and building protection" collapsed={true} > <DataEntryGroup name="Planning contraints and building protection" collapsed={true} >
<DataEntryGroup name="Building protection" collapsed={false} > <DataEntryGroup name="Building protection" collapsed={false} >