proper input form for UNESCO WHS
This commit is contained in:
parent
b80cdb23b4
commit
cea4bad4e4
@ -185,7 +185,7 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
planning_world_list_url: {
|
||||
planning_world_list_id: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
|
@ -206,23 +206,24 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||
user_verified_as={props.user_verified.planning_local_list_url}
|
||||
verified_count={props.building.verified.planning_local_list_url}
|
||||
/>
|
||||
<DataEntry
|
||||
title={dataFields.planning_world_list_url.title}
|
||||
slug="planning_world_list_url"
|
||||
value={props.building.planning_world_list_url}
|
||||
<NumericDataEntryWithFormattedLink
|
||||
title={dataFields.planning_world_list_id.title}
|
||||
slug="planning_world_list_id"
|
||||
value={props.building.planning_world_list_id}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
isUrl={true}
|
||||
placeholder="https://..."
|
||||
placeholder="If yes, add ID"
|
||||
linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } }
|
||||
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
||||
/>
|
||||
<Verification
|
||||
slug="planning_world_list_url"
|
||||
allow_verify={props.user !== undefined && props.building.planning_world_list_url !== null && !props.edited}
|
||||
slug="planning_world_list_id"
|
||||
allow_verify={props.user !== undefined && props.building.planning_world_list_id !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_world_list_url")}
|
||||
user_verified_as={props.user_verified.planning_world_list_url}
|
||||
verified_count={props.building.verified.planning_world_list_url}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_world_list_id")}
|
||||
user_verified_as={props.user_verified.planning_world_list_id}
|
||||
verified_count={props.building.verified.planning_world_list_id}
|
||||
/>
|
||||
|
||||
<DataEntry
|
||||
|
@ -476,10 +476,10 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
example: "",
|
||||
//tooltip: ,
|
||||
},
|
||||
planning_world_list_url: {
|
||||
planning_world_list_id: {
|
||||
category: Category.Planning,
|
||||
title: "Is it within a <a href=\"https://historicengland.org.uk/advice/hpg/has/whs/\" target=\"_blank\">World Heritage Site</a>?",
|
||||
example: "",
|
||||
example: "488",
|
||||
//tooltip: ,
|
||||
},
|
||||
planning_glher_url: {
|
||||
|
@ -146,7 +146,7 @@ const LAYER_QUERIES = {
|
||||
WHEN planning_list_grade = 'II' THEN 'Grade II Listed'
|
||||
WHEN planning_local_list_url <> '' THEN 'Locally Listed'
|
||||
WHEN planning_heritage_at_risk_url <> '' THEN 'Heritage at Risk'
|
||||
WHEN planning_world_list_url <> '' THEN 'In World Heritage Site'
|
||||
WHEN planning_world_list_id IS NOT NULL THEN 'In World Heritage Site'
|
||||
WHEN planning_in_apa_url <> '' THEN 'In Archaeological Priority Area'
|
||||
ELSE 'None'
|
||||
END
|
||||
@ -157,7 +157,7 @@ const LAYER_QUERIES = {
|
||||
planning_list_grade IS NOT NULL
|
||||
OR planning_in_conservation_area_url <> ''
|
||||
OR planning_local_list_url <> ''
|
||||
OR planning_world_list_url <> ''
|
||||
OR planning_world_list_id IS NOT NULL
|
||||
OR planning_heritage_at_risk_url <> ''
|
||||
OR planning_in_apa_url <> ''
|
||||
`,
|
||||
|
@ -75,7 +75,7 @@ This is the main table, containing almost all data collected by Colouring London
|
||||
- `planning_in_conservation_area_url`: conservation area data source link
|
||||
- `planning_list_grade`: National Heritage List for England listing grade
|
||||
- `planning_heritage_at_risk_url`: Heritage at Risk link
|
||||
- `planning_world_list_url`: UNESCO World Heritage list id
|
||||
- `planning_world_list_id`: UNESCO World Heritage list id
|
||||
- `planning_glher_url`: Greater London Historic Environment Record link
|
||||
- `planning_in_apa_url`: an Archeological Priority Area (APA) link
|
||||
- `planning_local_list_url`: local list reference link
|
||||
|
@ -48,7 +48,7 @@ COPY (SELECT
|
||||
planning_list_cat,
|
||||
planning_list_grade,
|
||||
planning_heritage_at_risk_url,
|
||||
planning_world_list_url,
|
||||
planning_world_list_id,
|
||||
planning_glher_url,
|
||||
planning_in_apa_url,
|
||||
planning_local_list_url,
|
||||
|
@ -5,9 +5,6 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_nhle_link text[];
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_apa_url;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_apa boolean DEFAULT FALSE;
|
||||
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_world_list_url;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_world_list_id int DEFAULT NULL;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -13,9 +13,6 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS planning_nhle_link;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_apa;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_apa_url VARCHAR DEFAULT '';
|
||||
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_world_list_id;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_world_list_url VARCHAR DEFAULT '';
|
||||
|
||||
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 '';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user