Redesign interface listing protection
Per @polly64 checkbox fields were removed and switch was made to using links as both as input method and for providing source. It is no longer possible to just claim that something is listed/featured, entering data will now be also faster
This commit is contained in:
parent
cbd99f49f3
commit
20f99e9103
@ -169,23 +169,11 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
planning_in_conservation_area: {
|
planning_in_conservation_area_url: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
planning_conservation_area_name: {
|
planning_in_conservation_area_source_url: {
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_in_list: {
|
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_list_id: {
|
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_list_cat: {
|
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
@ -193,15 +181,11 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
planning_heritage_at_risk_id: {
|
planning_heritage_at_risk_url: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
planning_world_list_id: {
|
planning_world_list_url: {
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_in_glher: {
|
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
@ -209,19 +193,7 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
planning_in_apa: {
|
planning_in_apa_url: {
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_apa_name: {
|
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_apa_tier: {
|
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_in_local_list: {
|
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
@ -229,10 +201,6 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
planning_in_historic_area_assessment: {
|
|
||||||
edit: true,
|
|
||||||
verify: true,
|
|
||||||
},
|
|
||||||
planning_historic_area_assessment_url: {
|
planning_historic_area_assessment_url: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
|
@ -87,9 +87,6 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
|
|||||||
const categoryKeys = {};
|
const categoryKeys = {};
|
||||||
const blackListedKeys = ['current_landuse_order',
|
const blackListedKeys = ['current_landuse_order',
|
||||||
'current_landuse_verified',
|
'current_landuse_verified',
|
||||||
'planning_in_list',
|
|
||||||
'planning_list_id',
|
|
||||||
'planning_list_cat',
|
|
||||||
'planning_list_grade',
|
'planning_list_grade',
|
||||||
'likes_total',
|
'likes_total',
|
||||||
'community_local_significance_total',
|
'community_local_significance_total',
|
||||||
|
@ -91,21 +91,23 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Designation/protection" collapsed={false} >
|
<DataEntryGroup name="Designation/protection" collapsed={false} >
|
||||||
<DataEntryGroup name="Conservation" collapsed={false} >
|
<DataEntryGroup name="Conservation" collapsed={false} >
|
||||||
<CheckboxDataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_in_conservation_area.title}
|
title={dataFields.planning_in_conservation_area_url.title}
|
||||||
slug="planning_in_conservation_area"
|
slug="planning_in_conservation_area_url"
|
||||||
value={props.building.planning_in_conservation_area}
|
value={props.building.planning_in_conservation_area_url}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder="https://..."
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="planning_in_conservation_area"
|
slug="planning_in_conservation_area_url"
|
||||||
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_url !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area")}
|
user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area_url")}
|
||||||
user_verified_as={props.user_verified.planning_in_conservation_area}
|
user_verified_as={props.user_verified.planning_in_conservation_area_url}
|
||||||
verified_count={props.building.verified.planning_in_conservation_area}
|
verified_count={props.building.verified.planning_in_conservation_area_url}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_conservation_area_name.title}
|
title={dataFields.planning_conservation_area_name.title}
|
||||||
@ -125,33 +127,14 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
/>
|
/>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Listed buildings & scheduled monuments" collapsed={false} >
|
<DataEntryGroup name="Listed buildings & scheduled monuments" collapsed={false} >
|
||||||
<CheckboxDataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_in_list.title}
|
|
||||||
slug="planning_in_list"
|
|
||||||
value={props.building.planning_in_list}
|
|
||||||
mode={props.mode}
|
|
||||||
disabled={false}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_in_list"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_in_list !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_in_list")}
|
|
||||||
user_verified_as={props.user_verified.planning_in_list}
|
|
||||||
verified_count={props.building.verified.planning_in_list}
|
|
||||||
/>
|
|
||||||
<MultiDataEntry
|
|
||||||
title={dataFields.planning_nhle_link.title}
|
title={dataFields.planning_nhle_link.title}
|
||||||
slug="planning_nhle_link"
|
slug="planning_nhle_link"
|
||||||
value={props.building.planning_nhle_link}
|
value={props.building.planning_nhle_link}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.planning_nhle_link.tooltip}
|
|
||||||
placeholder="https://..."
|
placeholder="https://..."
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
isUrl={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
@ -162,47 +145,6 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
user_verified_as={props.user_verified.planning_nhle_link}
|
user_verified_as={props.user_verified.planning_nhle_link}
|
||||||
verified_count={props.building.verified.planning_nhle_link}
|
verified_count={props.building.verified.planning_nhle_link}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
|
||||||
title={dataFields.planning_list_id.title}
|
|
||||||
slug="planning_list_id"
|
|
||||||
value={props.building.planning_list_id}
|
|
||||||
mode={props.mode}
|
|
||||||
disabled={false}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_list_id"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_list_id !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_list_id")}
|
|
||||||
user_verified_as={props.user_verified.planning_list_id}
|
|
||||||
verified_count={props.building.verified.planning_list_id}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.planning_list_cat.title}
|
|
||||||
slug="planning_list_cat"
|
|
||||||
value={props.building.planning_list_cat}
|
|
||||||
mode={props.mode}
|
|
||||||
disabled={false}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
options={[
|
|
||||||
"Listed Building",
|
|
||||||
"Scheduled Monument",
|
|
||||||
"World Heritage Site",
|
|
||||||
"Building Preservation Notice",
|
|
||||||
"None"
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_list_cat"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_list_cat !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_list_cat")}
|
|
||||||
user_verified_as={props.user_verified.planning_list_cat}
|
|
||||||
verified_count={props.building.verified.planning_list_cat}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.planning_list_grade.title}
|
title={dataFields.planning_list_grade.title}
|
||||||
slug="planning_list_grade"
|
slug="planning_list_grade"
|
||||||
@ -227,55 +169,60 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
verified_count={props.building.verified.planning_list_grade}
|
verified_count={props.building.verified.planning_list_grade}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_heritage_at_risk_id.title}
|
title={dataFields.planning_heritage_at_risk_url.title}
|
||||||
slug="planning_heritage_at_risk_id"
|
slug="planning_heritage_at_risk_url"
|
||||||
value={props.building.planning_heritage_at_risk_id}
|
value={props.building.planning_heritage_at_risk_url}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="planning_heritage_at_risk_id"
|
slug="planning_heritage_at_risk_url"
|
||||||
allow_verify={props.user !== undefined && props.building.planning_heritage_at_risk_id !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.planning_heritage_at_risk_url !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_heritage_at_risk_id")}
|
user_verified={props.user_verified.hasOwnProperty("planning_heritage_at_risk_url")}
|
||||||
user_verified_as={props.user_verified.planning_heritage_at_risk_id}
|
user_verified_as={props.user_verified.planning_heritage_at_risk_url}
|
||||||
verified_count={props.building.verified.planning_heritage_at_risk_id}
|
verified_count={props.building.verified.planning_heritage_at_risk_url}
|
||||||
/>
|
/>
|
||||||
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Other types of protection & recording" collapsed={false} >
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_world_list_id.title}
|
title={dataFields.planning_local_list_url.title}
|
||||||
slug="planning_world_list_id"
|
slug="planning_local_list_url"
|
||||||
value={props.building.planning_world_list_id}
|
value={props.building.planning_local_list_url}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder="https://..."
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="planning_world_list_id"
|
slug="planning_local_list_url"
|
||||||
allow_verify={props.user !== undefined && props.building.planning_world_list_id !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.planning_local_list_url !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_world_list_id")}
|
user_verified={props.user_verified.hasOwnProperty("planning_local_list_url")}
|
||||||
user_verified_as={props.user_verified.planning_world_list_id}
|
user_verified_as={props.user_verified.planning_local_list_url}
|
||||||
verified_count={props.building.verified.planning_world_list_id}
|
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}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder="https://..."
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="planning_world_list_url"
|
||||||
|
allow_verify={props.user !== undefined && props.building.planning_world_list_url !== 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}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CheckboxDataEntry
|
|
||||||
title={dataFields.planning_in_glher.title}
|
|
||||||
slug="planning_in_glher"
|
|
||||||
value={props.building.planning_in_glher}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_in_glher"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_in_glher !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_in_glher")}
|
|
||||||
user_verified_as={props.user_verified.planning_in_glher}
|
|
||||||
verified_count={props.building.verified.planning_in_glher}
|
|
||||||
/>
|
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_glher_url.title}
|
title={dataFields.planning_glher_url.title}
|
||||||
slug="planning_glher_url"
|
slug="planning_glher_url"
|
||||||
@ -283,6 +230,8 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder="https://..."
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="planning_glher_url"
|
slug="planning_glher_url"
|
||||||
@ -293,104 +242,23 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
verified_count={props.building.verified.planning_glher_url}
|
verified_count={props.building.verified.planning_glher_url}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<CheckboxDataEntry
|
|
||||||
title={dataFields.planning_in_apa.title}
|
|
||||||
slug="planning_in_apa"
|
|
||||||
value={props.building.planning_in_apa}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_in_apa"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_in_apa !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_in_apa")}
|
|
||||||
user_verified_as={props.user_verified.planning_in_apa}
|
|
||||||
verified_count={props.building.verified.planning_in_apa}
|
|
||||||
/>
|
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_apa_name.title}
|
title={dataFields.planning_in_apa_url.title}
|
||||||
slug="planning_apa_name"
|
slug="planning_in_apa_url"
|
||||||
value={props.building.planning_apa_name}
|
value={props.building.planning_in_apa_url}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder="https://..."
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="planning_apa_name"
|
slug="planning_in_apa_url"
|
||||||
allow_verify={props.user !== undefined && props.building.planning_apa_name !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.planning_in_apa_url !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_apa_name")}
|
user_verified={props.user_verified.hasOwnProperty("planning_in_apa_url")}
|
||||||
user_verified_as={props.user_verified.planning_apa_name}
|
user_verified_as={props.user_verified.planning_in_apa_url}
|
||||||
verified_count={props.building.verified.planning_apa_name}
|
verified_count={props.building.verified.planning_in_apa_url}
|
||||||
/>
|
|
||||||
<DataEntry
|
|
||||||
title={dataFields.planning_apa_tier.title}
|
|
||||||
slug="planning_apa_tier"
|
|
||||||
value={props.building.planning_apa_tier}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_apa_tier"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_apa_tier !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_apa_tier")}
|
|
||||||
user_verified_as={props.user_verified.planning_apa_tier}
|
|
||||||
verified_count={props.building.verified.planning_apa_tier}
|
|
||||||
/>
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Other types of protection & recording" collapsed={false} >
|
|
||||||
<CheckboxDataEntry
|
|
||||||
title={dataFields.planning_in_local_list.title}
|
|
||||||
slug="planning_in_local_list"
|
|
||||||
value={props.building.planning_in_local_list}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_in_local_list"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_in_local_list !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_in_local_list")}
|
|
||||||
user_verified_as={props.user_verified.planning_in_local_list}
|
|
||||||
verified_count={props.building.verified.planning_in_local_list}
|
|
||||||
/>
|
|
||||||
<DataEntry
|
|
||||||
title={dataFields.planning_local_list_url.title}
|
|
||||||
slug="planning_local_list_url"
|
|
||||||
value={props.building.planning_local_list_url}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_local_list_url"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_local_list_url !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_local_list_url")}
|
|
||||||
user_verified_as={props.user_verified.planning_local_list_url}
|
|
||||||
verified_count={props.building.verified.planning_local_list_url}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<CheckboxDataEntry
|
|
||||||
title={dataFields.planning_in_historic_area_assessment.title}
|
|
||||||
slug="planning_in_historic_area_assessment"
|
|
||||||
value={props.building.planning_in_historic_area_assessment}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_in_historic_area_assessment"
|
|
||||||
allow_verify={props.user !== undefined && props.building.planning_in_historic_area_assessment !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_in_historic_area_assessment")}
|
|
||||||
user_verified_as={props.user_verified.planning_in_historic_area_assessment}
|
|
||||||
verified_count={props.building.verified.planning_in_historic_area_assessment}
|
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_historic_area_assessment_url.title}
|
title={dataFields.planning_historic_area_assessment_url.title}
|
||||||
@ -399,6 +267,8 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder="https://..."
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="planning_historic_area_assessment_url"
|
slug="planning_historic_area_assessment_url"
|
||||||
|
@ -170,7 +170,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
|||||||
[Category.Planning]: [{
|
[Category.Planning]: [{
|
||||||
mapStyle: 'planning_combined',
|
mapStyle: 'planning_combined',
|
||||||
legend: {
|
legend: {
|
||||||
title: 'Statutory protections',
|
title: 'Designation/protection',
|
||||||
disclaimer: 'All data relating to designated buildings should be checked on the National Heritage List for England or local authority websites where used for planning or development purposes',
|
disclaimer: 'All data relating to designated buildings should be checked on the National Heritage List for England or local authority websites where used for planning or development purposes',
|
||||||
elements: [
|
elements: [
|
||||||
{ color: '#95beba', text: 'In conservation area'},
|
{ color: '#95beba', text: 'In conservation area'},
|
||||||
|
@ -446,111 +446,62 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_in_conservation_area: {
|
planning_in_conservation_area_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "In a conservation area?",
|
title: "Is the building in a <a href=\"https://historicengland.org.uk/listing/what-is-designation/local/conservation-areas/\" target=\"_blank\">Conservation Area</a>?",
|
||||||
example: true,
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_conservation_area_name: {
|
planning_conservation_area_name: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Conservation area name",
|
title: "Conservation Area Name",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_in_list: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "Is it listed on the National Heritage List for England?",
|
|
||||||
example: true,
|
|
||||||
//tooltip: ,
|
|
||||||
},
|
|
||||||
planning_nhle_link: {
|
planning_nhle_link: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "NHLE list entry link",
|
title: "Is the building on the <a href=\"https://historicengland.org.uk/advice/hpg/heritage-assets/nhle/\" target=\"_blank\">National Heritage List for England</a>?",
|
||||||
tooltip: "URL for National Heritage List for England entry",
|
|
||||||
example: ["", "", ""],
|
|
||||||
},
|
|
||||||
planning_list_id: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "National Heritage List for England list id",
|
|
||||||
example: "121436",
|
|
||||||
//tooltip: ,
|
|
||||||
},
|
|
||||||
planning_list_cat: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "National Heritage List for England list type",
|
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
|
||||||
},
|
},
|
||||||
planning_list_grade: {
|
planning_list_grade: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Listing grade",
|
title: "What is its grade?",
|
||||||
example: "II",
|
example: "II",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_heritage_at_risk_id: {
|
planning_heritage_at_risk_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Heritage at risk list id",
|
title: "Is it on the <a href=\"https://historicengland.org.uk/advice/heritage-at-risk/search-register/\" target=\"_blank\">Heritage at Risk</a> register?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_world_list_id: {
|
planning_world_list_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "World heritage list id",
|
title: "Is it within a <a href=\"https://historicengland.org.uk/advice/hpg/has/whs/\" target=\"_blank\">World Heritage Site</a>?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_in_glher: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "In the Greater London Historic Environment Record?",
|
|
||||||
example: true,
|
|
||||||
//tooltip: ,
|
|
||||||
},
|
|
||||||
planning_glher_url: {
|
planning_glher_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Greater London Historic Environment Record link",
|
title: "Is it recorded on the <a href=\"https://historicengland.org.uk/advice/technical-advice/information-management/hers/\" target=\"_blank\">Historic Environment Record</a>?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_in_apa: {
|
planning_in_apa_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "In an Architectural Priority Area?",
|
title: "Is it in an <a href=\"https://historicengland.org.uk/services-skills/our-planning-services/greater-london-archaeology-advisory-service/greater-london-archaeological-priority-areas/\" target=\"_blank\">Archaeological Priority Area</a>?",
|
||||||
example: true,
|
|
||||||
//tooltip: ,
|
|
||||||
},
|
|
||||||
planning_apa_name: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "Architectural Priority Area name",
|
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_apa_tier: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "Architectural Priority Area tier",
|
|
||||||
example: "2",
|
|
||||||
//tooltip: ,
|
|
||||||
},
|
|
||||||
planning_in_local_list: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "Is locally listed?",
|
|
||||||
example: true,
|
|
||||||
//tooltip: ,
|
|
||||||
},
|
|
||||||
planning_local_list_url: {
|
planning_local_list_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Local list link",
|
title: "Is it a <a href=\"https://historicengland.org.uk/advice/hpg/has/locallylistedhas/\" target=\"_blank\">Locally Listed Heritage Asset</a>?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_in_historic_area_assessment: {
|
|
||||||
category: Category.Planning,
|
|
||||||
title: "Within a historic area assessment?",
|
|
||||||
example: true,
|
|
||||||
//tooltip: ,
|
|
||||||
},
|
|
||||||
planning_historic_area_assessment_url: {
|
planning_historic_area_assessment_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Historic area assessment link",
|
title: "Does it have an <a href=\"https://historicengland.org.uk/images-books/publications/understanding-place-historic-area-assessments/\" target=\"_blank\">Historic Area Assessment</a>?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
|
@ -141,26 +141,26 @@ const LAYER_QUERIES = {
|
|||||||
geometry_id,
|
geometry_id,
|
||||||
(
|
(
|
||||||
CASE
|
CASE
|
||||||
WHEN planning_list_cat = 'Listed Building' and planning_list_grade = 'I' THEN 'Grade I Listed'
|
WHEN planning_list_grade = 'I' THEN 'Grade I Listed'
|
||||||
WHEN planning_list_cat = 'Listed Building' and planning_list_grade = 'II*' THEN 'Grade II* Listed'
|
WHEN planning_list_grade = 'II*' THEN 'Grade II* Listed'
|
||||||
WHEN planning_list_cat = 'Listed Building' and planning_list_grade = 'II' THEN 'Grade II Listed'
|
WHEN planning_list_grade = 'II' THEN 'Grade II Listed'
|
||||||
WHEN planning_in_local_list THEN 'Locally Listed'
|
WHEN planning_local_list_url <> '' THEN 'Locally Listed'
|
||||||
ELSE 'None'
|
ELSE 'None'
|
||||||
END
|
END
|
||||||
) AS listing_type,
|
) AS listing_type,
|
||||||
planning_in_conservation_area
|
planning_in_conservation_area_url <> '' AS planning_in_conservation_area
|
||||||
FROM buildings
|
FROM buildings
|
||||||
WHERE
|
WHERE
|
||||||
planning_in_conservation_area
|
planning_in_conservation_area_url <> ''
|
||||||
OR planning_in_local_list
|
OR planning_local_list_url <> ''
|
||||||
OR planning_list_cat IS NOT NULL`,
|
OR planning_list_grade IS NOT NULL`,
|
||||||
conservation_area: `
|
conservation_area: `
|
||||||
SELECT
|
SELECT
|
||||||
geometry_id
|
geometry_id
|
||||||
FROM
|
FROM
|
||||||
buildings
|
buildings
|
||||||
WHERE
|
WHERE
|
||||||
planning_in_conservation_area = true`,
|
planning_in_conservation_area_url = true`,
|
||||||
sust_dec: `
|
sust_dec: `
|
||||||
SELECT
|
SELECT
|
||||||
geometry_id,
|
geometry_id,
|
||||||
|
@ -70,22 +70,14 @@ This is the main table, containing almost all data collected by Colouring London
|
|||||||
- `sust_dec`: DEC rating
|
- `sust_dec`: DEC rating
|
||||||
- `sust_retrofit_date`: year of last significant retrofit
|
- `sust_retrofit_date`: year of last significant retrofit
|
||||||
- `planning_portal_link`: link to an entry on https://www.planningportal.co.uk/
|
- `planning_portal_link`: link to an entry on https://www.planningportal.co.uk/
|
||||||
- `planning_in_conservation_area`: in a conservation area? (True/False)
|
- `planning_in_conservation_area_url`: conservation area appraisal link
|
||||||
- `planning_conservation_area_name`: conservation area name
|
- `planning_in_conservation_area_url`: conservation area data source link
|
||||||
- `planning_in_list`: in the National Heritage List for England? (True/False)
|
|
||||||
- `planning_list_id`: National Heritage List for England ID
|
|
||||||
- `planning_list_cat`: National Heritage List for England listing type
|
|
||||||
- `planning_list_grade`: National Heritage List for England listing grade
|
- `planning_list_grade`: National Heritage List for England listing grade
|
||||||
- `planning_heritage_at_risk_id`: on the Heritage at Risk list? (True/False)
|
- `planning_heritage_at_risk_url`: Heritage at Risk link
|
||||||
- `planning_world_list_id`: UNESCO World Heritage list ID
|
- `planning_world_list_url`: UNESCO World Heritage list id
|
||||||
- `planning_in_glher`: in the Greater London Historic Environment Record? (True/False)
|
|
||||||
- `planning_glher_url`: Greater London Historic Environment Record link
|
- `planning_glher_url`: Greater London Historic Environment Record link
|
||||||
- `planning_in_apa`: in an Architectural Priority Area? (True/False)
|
- `planning_in_apa_url`: an Archeological Priority Area (APA) link
|
||||||
- `planning_apa_name`: Architectural Priority Area name
|
|
||||||
- `planning_apa_tier`: Architectural Priority Area tier
|
|
||||||
- `planning_in_local_list`: in a local list? (True/False)
|
|
||||||
- `planning_local_list_url`: local list reference link
|
- `planning_local_list_url`: local list reference link
|
||||||
- `planning_in_historic_area_assessment`: within a historic area assessment? (True/False)
|
|
||||||
- `planning_historic_area_assessment_url`: historic area assessment reference link
|
- `planning_historic_area_assessment_url`: historic area assessment reference link
|
||||||
- `likes_total`: number of times the building has been liked by Colouring London users
|
- `likes_total`: number of times the building has been liked by Colouring London users
|
||||||
|
|
||||||
|
@ -40,22 +40,18 @@ COPY (SELECT
|
|||||||
construction_secondary_materials,
|
construction_secondary_materials,
|
||||||
construction_roof_covering,
|
construction_roof_covering,
|
||||||
planning_portal_link,
|
planning_portal_link,
|
||||||
planning_in_conservation_area,
|
planning_in_conservation_area_url,
|
||||||
|
planning_in_conservation_area_source_url,
|
||||||
planning_conservation_area_name,
|
planning_conservation_area_name,
|
||||||
planning_in_list,
|
planning_in_list,
|
||||||
planning_list_id,
|
planning_list_id,
|
||||||
planning_list_cat,
|
planning_list_cat,
|
||||||
planning_list_grade,
|
planning_list_grade,
|
||||||
planning_heritage_at_risk_id,
|
planning_heritage_at_risk_url,
|
||||||
planning_world_list_id,
|
planning_world_list_url,
|
||||||
planning_in_glher,
|
|
||||||
planning_glher_url,
|
planning_glher_url,
|
||||||
planning_in_apa,
|
planning_in_apa_url,
|
||||||
planning_apa_name,
|
|
||||||
planning_apa_tier,
|
|
||||||
planning_in_local_list,
|
|
||||||
planning_local_list_url,
|
planning_local_list_url,
|
||||||
planning_in_historic_area_assessment,
|
|
||||||
planning_historic_area_assessment_url,
|
planning_historic_area_assessment_url,
|
||||||
likes_total
|
likes_total
|
||||||
FROM buildings)
|
FROM buildings)
|
||||||
|
26
migrations/033.redesign_protection_designation.down.sql
Normal file
26
migrations/033.redesign_protection_designation.down.sql
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
--into a single link from array of links
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_nhle_link;
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_nhle_link text[];
|
||||||
|
|
||||||
|
--changed into URL
|
||||||
|
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;
|
||||||
|
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_conservation_area_url;
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_conservation_area boolean DEFAULT FALSE;
|
||||||
|
|
||||||
|
-- URL column exists already
|
||||||
|
ALTER TABLE ADD COLUMN IF NOT EXISTS planning_list_id int DEFAULT NULL;
|
||||||
|
|
||||||
|
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_tier smallint DEFAULT NULL;
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_local_list boolean DEFAULT FALSE;
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_in_historic_area_assessment boolean DEFAULT FALSE;
|
||||||
|
|
43
migrations/033.redesign_protection_designation.up.sql
Normal file
43
migrations/033.redesign_protection_designation.up.sql
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
-- this type of links is expected:
|
||||||
|
-- 'https://historicengland.org.uk/listing/the-list/list-entry/1080446?section=official-list-entry'
|
||||||
|
|
||||||
|
UPDATE buildings
|
||||||
|
SET planning_nhle_link = CONCAT('https://historicengland.org.uk/listing/the-list/list-entry/', planning_list_id,
|
||||||
|
'?section=official-list-entry')
|
||||||
|
WHERE planning_nhle_link = ''
|
||||||
|
AND planning_list_id IS NOT NULL;
|
||||||
|
|
||||||
|
|
||||||
|
UPDATE buildings
|
||||||
|
SET planning_local_list_url = 'identified as listed: please replace with link'
|
||||||
|
WHERE planning_local_list_url = ''
|
||||||
|
AND planning_in_local_list;
|
||||||
|
|
||||||
|
--into a single link from array of links
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_nhle_link;
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_nhle_link VARCHAR DEFAULT '';
|
||||||
|
|
||||||
|
--changed into URL
|
||||||
|
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 '';
|
||||||
|
|
||||||
|
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 '';
|
||||||
|
|
||||||
|
-- URL column exists already
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_list_id;
|
||||||
|
|
||||||
|
--fully removed
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_glher;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_apa_name;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_apa_tier;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_local_list;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_in_historic_area_assessment;
|
||||||
|
|
||||||
|
rg "planning_in_apa|planning_world_list_id|planning_heritage_at_risk_id|planning_in_conservation_area|planning_in_glher|planning_apa_name|planning_apa_tier|planning_in_local_list|planning_in_historic_area_assessment"
|
Loading…
Reference in New Issue
Block a user