add conservation area id

This commit is contained in:
Mateusz Konieczny 2022-09-29 14:40:06 +02:00
parent 6c29c36b3a
commit 50cecf36bb
5 changed files with 40 additions and 6 deletions

View File

@ -169,6 +169,22 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
work_on_site_is_completed: {
edit: true,
verify: true,
},
work_on_site_is_completed_on_year: {
edit: true,
verify: true,
},
planning_planning_application_id_crowdsourced: {
edit: true,
verify: true,
},
planning_in_conservation_area_id: {
edit: true,
verify: true,
},
planning_in_conservation_area_url: { planning_in_conservation_area_url: {
edit: true, edit: true,
verify: true, verify: true,

View File

@ -91,14 +91,13 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
<DataEntryGroup name="Designation/protection" collapsed={false} > <DataEntryGroup name="Designation/protection" collapsed={false} >
<DataEntryGroup name="Conservation" collapsed={false} > <DataEntryGroup name="Conservation" collapsed={false} >
<DataEntry <DataEntry
title={dataFields.planning_in_conservation_area_url.title} title={dataFields.planning_in_conservation_area_id.title}
slug="planning_in_conservation_area_url" slug="planning_in_conservation_area_id"
value={props.building.planning_in_conservation_area_url} value={props.building.planning_in_conservation_area_id}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
isUrl={true} placeholder="Please add Conservation Area identifier"
placeholder="Please add relevant link here"
/> />
<Verification <Verification
slug="planning_in_conservation_area_url" slug="planning_in_conservation_area_url"
@ -108,6 +107,16 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
user_verified_as={props.user_verified.planning_in_conservation_area_url} user_verified_as={props.user_verified.planning_in_conservation_area_url}
verified_count={props.building.verified.planning_in_conservation_area_url} verified_count={props.building.verified.planning_in_conservation_area_url}
/> />
<DataEntry
title={dataFields.planning_in_conservation_area_url.title}
slug="planning_in_conservation_area_url"
value={props.building.planning_in_conservation_area_url}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
isUrl={true}
placeholder="Please add CA appraisal link here"
/>
<DataEntry <DataEntry
title={dataFields.planning_conservation_area_name.title} title={dataFields.planning_conservation_area_name.title}
slug="planning_conservation_area_name" slug="planning_conservation_area_name"

View File

@ -452,6 +452,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: "", example: "",
//tooltip: , //tooltip: ,
}, },
planning_in_conservation_area_id: {
category: Category.Planning,
title: "Conservation Area identifier",
example: "",
//tooltip: ,
},
planning_conservation_area_name: { planning_conservation_area_name: {
category: Category.Planning, category: Category.Planning,
title: "Conservation Area Name", title: "Conservation Area Name",

View File

@ -8,8 +8,9 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_apa boolean DEFAULT F
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_heritage_at_risk_url; ALTER TABLE buildings DROP COLUMN IF EXISTS planning_heritage_at_risk_url;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_heritage_at_risk_id int DEFAULT NULL; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_heritage_at_risk_id int DEFAULT NULL;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area_url; ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area_id;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area boolean DEFAULT FALSE; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area boolean DEFAULT FALSE;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area_url;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_glher boolean DEFAULT FALSE; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_glher boolean DEFAULT FALSE;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_apa_name VARCHAR DEFAULT ''; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_apa_name VARCHAR DEFAULT '';

View File

@ -16,6 +16,8 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_apa_url VARCHAR DEFAU
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_heritage_at_risk_id; ALTER TABLE buildings DROP COLUMN IF EXISTS planning_heritage_at_risk_id;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_heritage_at_risk_url VARCHAR DEFAULT ''; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_heritage_at_risk_url VARCHAR DEFAULT '';
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area_id VARCHAR DEFAULT '';
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area; ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area_url VARCHAR DEFAULT ''; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area_url VARCHAR DEFAULT '';