diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index c780eb04..624ed479 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -305,6 +305,10 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true, }, + planning_in_conservation_area: { + edit: true, + verify: true, + }, planning_in_conservation_area_id: { edit: true, verify: true, @@ -325,6 +329,10 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true, }, + planning_world_heritage_site: { + edit: true, + verify: true, + }, planning_world_list_id: { edit: true, verify: true, @@ -333,14 +341,26 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true, }, + planning_in_apa: { + edit: true, + verify: true, + }, planning_in_apa_url: { edit: true, verify: true, }, + planning_local_list: { + edit: true, + verify: true, + }, planning_local_list_url: { edit: true, verify: true, }, + planning_historic_area_assessment: { + edit: true, + verify: true, + }, planning_historic_area_assessment_url: { edit: true, verify: true, @@ -357,6 +377,22 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true, }, + planning_heritage_at_risk: { + edit: true, + verify: true, + }, + planning_scientific_interest: { + edit: true, + verify: true, + }, + planning_scientific_interest_source_type: { + edit: true, + verify: true, + }, + planning_scientific_interest_source_links: { + edit: true, + verify: true, + }, sust_breeam_rating: { 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 ce091231..138832a5 100644 --- a/app/src/frontend/building/data-containers/planning.tsx +++ b/app/src/frontend/building/data-containers/planning.tsx @@ -335,198 +335,301 @@ const PlanningView: React.FunctionComponent = (props) => { } - +
+ { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } } - linkDescriptionFunction={(id: String) => { return "ID Link" } } + mode={props.mode} /> - + {(props.building.planning_heritage_at_risk == null || props.building.planning_heritage_at_risk == false) ? <> : + <> + + + + } +
+ - - + + {(props.building.planning_world_heritage_site == null || props.building.planning_world_heritage_site == false) ? <> : + <> + { return "https://whc.unesco.org/en/list/" + id } } + linkDescriptionFunction={(id: String) => { return "ID Link" } } + /> + + + } +
+ - - + + {(props.building.planning_local_list == null || props.building.planning_local_list == false) ? <> : + <> + + + + } +
+ { return "https://whc.unesco.org/en/list/" + id } } - linkDescriptionFunction={(id: String) => { return "ID Link" } } - /> - - + + {(props.building.planning_in_conservation_area == null || props.building.planning_in_conservation_area == false) ? <> : + <> + + {props.building.planning_in_conservation_area_url === "" ? "Our CA map records this building as not being within a CA. To help us verify this, please click ‘verify’ or, if info is incorrect, please add the local authority’s CA appraisal link." : "" } + {props.building.planning_in_conservation_area_url === "identified as listed: please replace with links" ? "Our CA map records this building as being within a CA. To help us verify this information please add the local authority’s CA appraisal link and then click ‘verify’." : "" } + + + } +
+ - - - {/* - + + {(props.building.planning_in_apa == null || props.building.planning_in_apa == false) ? <> : + <> + + + + } +
+ - - */} - + + {(props.building.planning_scientific_interest == null || props.building.planning_scientific_interest == false) ? <> : + <> + + {(props.building.planning_scientific_interest_source_type == dataFields.planning_scientific_interest_source_type.items[0] || + props.building.planning_scientific_interest_source_type == dataFields.planning_scientific_interest_source_type.items[1] || + props.building.planning_scientific_interest_source_type == null) ? <> : + <> + + + } + + } +
+ - {props.building.planning_in_conservation_area_url === "" ? "Our CA map records this building as not being within a CA. To help us verify this, please click ‘verify’ or, if info is incorrect, please add the local authority’s CA appraisal link." : "" } - {props.building.planning_in_conservation_area_url === "identified as listed: please replace with links" ? "Our CA map records this building as being within a CA. To help us verify this information please add the local authority’s CA appraisal link and then click ‘verify’." : "" } - - + /> - {/* - - - */} - - + user_verified={props.user_verified.hasOwnProperty("planning_historic_area_assessment")} + user_verified_as={props.user_verified.planning_historic_area_assessment} + verified_count={props.building.verified.planning_historic_area_assessment} + /> + {(props.building.planning_historic_area_assessment == null || props.building.planning_historic_area_assessment == false) ? <> : + <> + + + + } diff --git a/app/src/frontend/config/data-fields-config.ts b/app/src/frontend/config/data-fields-config.ts index 617fda6f..c2f24093 100644 --- a/app/src/frontend/config/data-fields-config.ts +++ b/app/src/frontend/config/data-fields-config.ts @@ -736,6 +736,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ example: "1112/QWERTY", //tooltip: , }, + planning_in_conservation_area: { + category: Category.Planning, + title: "Is the building in a conservation area?", + tooltip: "Is the building in a conservation area?", + example: true, + }, planning_in_conservation_area_id: { category: Category.Planning, title: "Conservation Area identifier", @@ -766,9 +772,15 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ example: "", //tooltip: , }, + planning_world_heritage_site: { + category: Category.Planning, + title: "Is the building on a World Heritage Site?", + tooltip: "Is the building on a World Heritage Site", + example: true, + }, planning_world_list_id: { category: Category.Planning, - title: "If the building is on a World Heritage Site please add the ID:", + title: "If the building is on a World Heritage Site please add the ID:", example: "488", //tooltip: , }, @@ -778,18 +790,36 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ example: "", //tooltip: , }, + planning_in_apa: { + category: Category.Planning, + title: "Is the building in an area of archaeological priority?", + tooltip: "Is the building in an area of archaeological priority?", + example: true, + }, planning_in_apa_url: { category: Category.Planning, title: "Is the building in an area of archaeological priority?", example: "", //tooltip: , }, + planning_local_list: { + category: Category.Planning, + title: "Is the building a locally listed heritage asset?", + tooltip: "Is the building a locally listed heritage asset?", + example: true, + }, planning_local_list_url: { category: Category.Planning, title: "Is the building a locally listed heritage asset?", example: "", //tooltip: , }, + planning_historic_area_assessment: { + category: Category.Planning, + title: "Does the building have any other type of designation?", + tooltip: "Does the building have any other type of designation?", + example: true, + }, planning_historic_area_assessment_url: { category: Category.Planning, title: "Does it have any other type of designation?", @@ -814,6 +844,31 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ tooltip: "URL(s) for missing planning information", example: ["", "", ""], }, + planning_heritage_at_risk: { + category: Category.Planning, + title: "Is the building on a heritage at risk register?", + tooltip: "Is the building on a heritage at risk register?", + example: true, + }, + planning_scientific_interest: { + category: Category.Planning, + title: "Is the building on a site of special scientific interest?", + tooltip: "Is the building on a site of special scientific interest?", + example: true, + }, + planning_scientific_interest_source_type: { + category: Category.Team, + title: "Source type", + tooltip: "Source type for site of special scientific interest data", + example: "", + items: commonSourceTypes + }, + planning_scientific_interest_source_links: { + category: Category.Team, + title: "Source links", + tooltip: "URL(s) for site of special scientific interest data", + example: ["", "", ""], + }, is_domestic: { diff --git a/migrations/041.ui_revamp_tweaks.down.sql b/migrations/041.ui_revamp_tweaks.down.sql index 795fca5e..6a6482d5 100644 --- a/migrations/041.ui_revamp_tweaks.down.sql +++ b/migrations/041.ui_revamp_tweaks.down.sql @@ -18,3 +18,17 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_site_completio ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_site_completion_source_links; ALTER TABLE buildings DROP COLUMN IF EXISTS planning_missing_data; ALTER TABLE buildings DROP COLUMN IF EXISTS planning_missing_data_links; + +ALTER TABLE buildings DROP COLUMN IF EXISTS date_source_type; +ALTER TABLE buildings DROP COLUMN IF EXISTS date_source_links; + +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_heritage_at_risk; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_world_heritage_site; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_local_list; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_apa; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_historic_area_assessment; + +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_scientific_interest; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_scientific_interest_source_type; +ALTER TABLE buildings DROP COLUMN IF EXISTS planning_scientific_interest_source_links; diff --git a/migrations/041.ui_revamp_tweaks.up.sql b/migrations/041.ui_revamp_tweaks.up.sql index dce58c01..04b06baf 100644 --- a/migrations/041.ui_revamp_tweaks.up.sql +++ b/migrations/041.ui_revamp_tweaks.up.sql @@ -20,4 +20,15 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_missing_data boolean; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_missing_data_links text[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS date_source_type text; -ALTER TABLE buildings ADD COLUMN IF NOT EXISTS date_source_links text[]; \ No newline at end of file +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS date_source_links text[]; + +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_heritage_at_risk boolean; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_world_heritage_site boolean; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_local_list boolean; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area boolean; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_apa boolean; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_historic_area_assessment boolean; + +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_scientific_interest boolean; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_scientific_interest_source_type text; +ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_scientific_interest_source_links text[];