diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index beb71f96..cb5a4f6f 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -173,11 +173,15 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true, }, - work_on_site_is_completed_on_year: { + planning_crowdsourced_site_completion_status: { edit: true, verify: true, }, - planning_planning_application_id_crowdsourced: { + planning_crowdsourced_site_completion_year: { + edit: true, + verify: true, + }, + planning_crowdsourced_planning_id: { edit: true, verify: true, }, diff --git a/app/src/frontend/building/data-containers/planning.tsx b/app/src/frontend/building/data-containers/planning.tsx index 81f5336b..7745898f 100644 --- a/app/src/frontend/building/data-containers/planning.tsx +++ b/app/src/frontend/building/data-containers/planning.tsx @@ -59,16 +59,54 @@ const PlanningView: React.FunctionComponent = (props) => { + title={dataFields.planning_crowdsourced_site_completion_year.title} + slug="planning_crowdsourced_site_completion_year" + value={props.building.planning_crowdsourced_site_completion_year} + mode={props.mode} + copy={props.copy} + onChange={props.onChange} + disabled={true} + /> + + {/*disabled={true}*/} + + + + + + { /* TODO: have just checkbox, without "Yes" */ } + {/*disabled={true}*/} + @@ -80,6 +118,23 @@ const PlanningView: React.FunctionComponent = (props) => { /> +
+ +
+ + To also add your opinion on how well this building works for the community, visit Community section.
diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index e24c9225..21d95641 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -452,6 +452,14 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ //tooltip: , }, + edit_history: { + category: Category.Planning, + title: "PLANNING DATA", + tooltip: "PLANNING DATA", + example: [{}], + }, + + planning_portal_link: { category: Category.Planning, title: "Local authority planning application link", @@ -464,6 +472,24 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ example: "", //tooltip: , }, + planning_crowdsourced_site_completion_status: { + category: Category.Planning, + title: "Has the work on this site been completed?", + example: true, + //tooltip: , + }, + planning_crowdsourced_site_completion_year: { + category: Category.Planning, + title: "Year of completion if known", + example: 2022, + //tooltip: , + }, + planning_crowdsourced_planning_id: { + category: Category.Planning, + title: "Are you aware of a planning application that has been recently submitted for this site and is not listed in the green box above, please enter planning application ID below:", + example: "1112/QWERTY", + //tooltip: , + }, planning_in_conservation_area_id: { category: Category.Planning, title: "Conservation Area identifier", diff --git a/maintenance/extract_data/README.md b/maintenance/extract_data/README.md index 44907546..a405dc1f 100644 --- a/maintenance/extract_data/README.md +++ b/maintenance/extract_data/README.md @@ -70,6 +70,9 @@ This is the main table, containing almost all data collected by Colouring London - `sust_dec`: DEC rating - `sust_retrofit_date`: year of last significant retrofit - `planning_portal_link`: link to an entry on https://www.planningportal.co.uk/ +- `planning_crowdsourced_site_completion_status`: status of completion of costruction at given location +- `planning_crowdsourced_site_completion_year`: year of completion of costruction at given location +- `planning_crowdsourced_planning_id`: id of planning application for a given location - `planning_list_id`: National Heritage List for England ID - `planning_in_conservation_area_id`: conservation area ID - `planning_in_conservation_area_url`: conservation area appraisal link diff --git a/migrations/035.additional_crowdsourcing_planning_data.down.sql b/migrations/035.additional_crowdsourcing_planning_data.down.sql new file mode 100644 index 00000000..6889a408 --- /dev/null +++ b/migrations/035.additional_crowdsourcing_planning_data.down.sql @@ -0,0 +1,3 @@ +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_site_completion_status; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_site_completion_year; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_planning_id; diff --git a/migrations/035.additional_crowdsourcing_planning_data.up.sql b/migrations/035.additional_crowdsourcing_planning_data.up.sql new file mode 100644 index 00000000..bfb92bf5 --- /dev/null +++ b/migrations/035.additional_crowdsourcing_planning_data.up.sql @@ -0,0 +1,3 @@ +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_crowdsourced_site_completion_status boolean; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_crowdsourced_site_completion_year smallint; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_crowdsourced_planning_id VARCHAR DEFAULT '';