Merge pull request #1207 from colouring-cities/interface/ui-tweaks

Interface/UI tweaks
This commit is contained in:
Mike Simpson 2023-07-18 10:30:18 +01:00 committed by GitHub
commit 6617c284e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 644 additions and 221 deletions

View File

@ -134,6 +134,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
date_source_type: {
edit: true,
verify: true,
},
date_source_links: {
edit: true,
verify: true,
},
facade_year: { facade_year: {
edit: true, edit: true,
verify: true, verify: true,
@ -285,10 +293,22 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
planning_crowdsourced_site_completion_source_type: {
edit: true,
verify: true,
},
planning_crowdsourced_site_completion_source_links: {
edit: true,
verify: true,
},
planning_crowdsourced_planning_id: { planning_crowdsourced_planning_id: {
edit: true, edit: true,
verify: true, verify: true,
}, },
planning_in_conservation_area: {
edit: true,
verify: true,
},
planning_in_conservation_area_id: { planning_in_conservation_area_id: {
edit: true, edit: true,
verify: true, verify: true,
@ -309,6 +329,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
planning_world_heritage_site: {
edit: true,
verify: true,
},
planning_world_list_id: { planning_world_list_id: {
edit: true, edit: true,
verify: true, verify: true,
@ -317,14 +341,26 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
planning_in_apa: {
edit: true,
verify: true,
},
planning_in_apa_url: { planning_in_apa_url: {
edit: true, edit: true,
verify: true, verify: true,
}, },
planning_local_list: {
edit: true,
verify: true,
},
planning_local_list_url: { planning_local_list_url: {
edit: true, edit: true,
verify: true, verify: true,
}, },
planning_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,
@ -333,6 +369,30 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true, edit: true,
verify: true, verify: true,
}, },
planning_missing_data: {
edit: true,
verify: true,
},
planning_missing_data_links: {
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: { sust_breeam_rating: {
edit: true, edit: true,
verify: true, verify: true,

View File

@ -1,7 +1,9 @@
{ {
"cityName": "Cities", "cityName": "Cities",
"projectBlurb": "Colouring {City Name} is part Colouring Cities.", "projectBlurb": "Colouring {City Name} is part Colouring Cities.",
"githubURL": "https://github.com/colouring-cities/colouring-core", "githubURL": "https://github.com/colouring-cities/colouring-core",
"manualURL": "https://github.com/colouring-cities/manual/wiki/M3.-COLOURING-BRITAIN",
"privacyStatement": "{Privacy statement goes here}", "privacyStatement": "{Privacy statement goes here}",
"initialMapPosition": [ 51.5245255, -0.1338422 ], "initialMapPosition": [ 51.5245255, -0.1338422 ],

View File

@ -1,8 +1,12 @@
import { StringNullableChain } from "lodash";
export interface CCConfig export interface CCConfig
{ {
cityName: string; // City name (i.e. "Colouring {City Name}") cityName: string; // City name (i.e. "Colouring {City Name}")
projectBlurb: string; // Description used on homepage projectBlurb: string; // Description used on homepage
githubURL: string; // URL of the project's GitHub repository githubURL: string; // URL of the project's GitHub repository
manualURL: string; // Link to the project's page in the Open Manual (i.e. https://github.com/colouring-cities/manual/wiki/M3.-COLOURING-BRITAIN)
privacyStatement: string; // Privacy statement, including where data is stored privacyStatement: string; // Privacy statement, including where data is stored
initialMapPosition: [number, number]; // Initial location of the map [latitude, longitude] initialMapPosition: [number, number]; // Initial location of the map [latitude, longitude]

View File

@ -103,6 +103,7 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.facade_year} user_verified_as={props.user_verified.facade_year}
verified_count={props.building.verified.facade_year} verified_count={props.building.verified.facade_year}
/> />
<hr/>
<SelectDataEntry <SelectDataEntry
title={dataFields.date_source.title} title={dataFields.date_source.title}
slug="date_source" slug="date_source"
@ -132,13 +133,43 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
/> />
</> </>
} }
<DataEntry <hr/>
<SelectDataEntry
title={dataFields.date_source_type.title}
slug="date_source_type"
value={props.building.date_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.date_source_type.tooltip}
options={dataFields.date_source_type.items}
placeholder={dataFields.date_source_type.example}
/>
{(props.building.date_source_type == dataFields.date_source_type.items[0] ||
props.building.date_source_type == dataFields.date_source_type.items[1] ||
props.building.date_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.date_source_links.title}
slug="date_source_links"
value={props.building.date_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.date_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
{/*<DataEntry
title="Year of completion (best estimate)" title="Year of completion (best estimate)"
slug="" slug=""
value="" value=""
mode='view' mode='view'
tooltip='Coming Soon' tooltip='Coming Soon'
/> />*/}
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Cladding, extensions and retrofits"> <DataEntryGroup name="Cladding, extensions and retrofits">
<NumericDataEntry <NumericDataEntry

View File

@ -65,6 +65,8 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
} }
const { flood, floodSwitchOnClick, housing, housingSwitchOnClick, creative, creativeSwitchOnClick, vista, vistaSwitchOnClick, parcel, parcelSwitchOnClick, conservation, conservationSwitchOnClick, darkLightTheme } = useDisplayPreferences(); const { flood, floodSwitchOnClick, housing, housingSwitchOnClick, creative, creativeSwitchOnClick, vista, vistaSwitchOnClick, parcel, parcelSwitchOnClick, conservation, conservationSwitchOnClick, darkLightTheme } = useDisplayPreferences();
const communityLinkUrl = `/${props.mode}/${Category.Community}/${props.building.building_id}`; const communityLinkUrl = `/${props.mode}/${Category.Community}/${props.building.building_id}`;
const currentYear = new Date().getFullYear();
return ( return (
<Fragment> <Fragment>
<DataEntryGroup name="Current planning applications" collapsed={true} > <DataEntryGroup name="Current planning applications" collapsed={true} >
@ -88,36 +90,111 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
} }
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Year of completion" collapsed={true} > <DataEntryGroup name="Year of completion" collapsed={true} >
<DataEntry <LogicalDataEntry
title="Was the building completed?" slug='planning_crowdsourced_site_completion_status'
slug="" title={dataFields.planning_crowdsourced_site_completion_status.title}
value="" tooltip={dataFields.planning_crowdsourced_site_completion_status.tooltip}
mode='view' value={props.building.planning_crowdsourced_site_completion_status}
tooltip='Coming Soon' copy={props.copy}
onChange={props.onChange}
mode={props.mode}
/> />
<DataEntry <Verification
title="Year of completion" slug="planning_crowdsourced_site_completion_status"
slug="" allow_verify={props.user !== undefined && props.building.planning_crowdsourced_site_completion_status !== null && !props.edited}
value="" onVerify={props.onVerify}
mode='view' user_verified={props.user_verified.hasOwnProperty("planning_crowdsourced_site_completion_status")}
tooltip='Coming Soon' user_verified_as={props.user_verified.planning_crowdsourced_site_completion_status}
verified_count={props.building.verified.planning_crowdsourced_site_completion_status}
/> />
{props.building.planning_crowdsourced_site_completion_status == null ? <></> :
<>
<NumericDataEntry
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}
step={1}
min={1}
max={currentYear}
tooltip={dataFields.planning_crowdsourced_site_completion_year.tooltip}
/>
<Verification
slug="planning_crowdsourced_site_completion_year"
allow_verify={props.user !== undefined && props.building.planning_crowdsourced_site_completion_year !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_crowdsourced_site_completion_year")}
user_verified_as={props.user_verified.planning_crowdsourced_site_completion_year}
verified_count={props.building.verified.planning_crowdsourced_site_completion_year}
/>
<SelectDataEntry
title={dataFields.planning_crowdsourced_site_completion_source_type.title}
slug="planning_crowdsourced_site_completion_source_type"
value={props.building.planning_crowdsourced_site_completion_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.planning_crowdsourced_site_completion_source_type.tooltip}
options={dataFields.planning_crowdsourced_site_completion_source_type.items}
placeholder={dataFields.planning_crowdsourced_site_completion_source_type.example}
/>
{(props.building.planning_crowdsourced_site_completion_source_type == dataFields.planning_crowdsourced_site_completion_source_type.items[0] ||
props.building.planning_crowdsourced_site_completion_source_type == dataFields.planning_crowdsourced_site_completion_source_type.items[1] ||
props.building.planning_crowdsourced_site_completion_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.planning_crowdsourced_site_completion_source_links.title}
slug="planning_crowdsourced_site_completion_source_links"
value={props.building.planning_crowdsourced_site_completion_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.planning_crowdsourced_site_completion_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</>
}
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Incomplete/missing data" collapsed={true} > <DataEntryGroup name="Incomplete/missing data" collapsed={true} >
<DataEntry <LogicalDataEntry
title="Is information on a planning application relating to this building missing?" slug='planning_missing_data'
slug="" title={dataFields.planning_missing_data.title}
value="" tooltip={dataFields.planning_missing_data.tooltip}
mode='view' value={props.building.planning_missing_data}
tooltip='Coming Soon' copy={props.copy}
onChange={props.onChange}
mode={props.mode}
/> />
<DataEntry <Verification
title="Link (to correct data)" slug="planning_missing_data"
slug="" allow_verify={props.user !== undefined && props.building.planning_missing_data !== null && !props.edited}
value="" onVerify={props.onVerify}
mode='view' user_verified={props.user_verified.hasOwnProperty("planning_missing_data")}
tooltip='Coming Soon' user_verified_as={props.user_verified.planning_missing_data}
verified_count={props.building.verified.planning_missing_data}
/> />
{props.building.planning_missing_data == null ? <></> :
<>
<MultiDataEntry
title={dataFields.planning_missing_data_links.title}
slug="planning_missing_data_links"
value={props.building.planning_missing_data_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.planning_missing_data_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<InfoBox> <InfoBox>
If you feel there are incorrect or missing data relating to this building please contact: If you feel there are incorrect or missing data relating to this building please contact:
planningdata@London.gov.uk planningdata@London.gov.uk
@ -259,48 +336,26 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
<button className={`map-switcher-inline ${conservation}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={conservationSwitchOnClick}> <button className={`map-switcher-inline ${conservation}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={conservationSwitchOnClick}>
{(conservation === 'enabled')? 'Click to hide Conservation Areas' : 'Click to see Conservation Areas'} {(conservation === 'enabled')? 'Click to hide Conservation Areas' : 'Click to see Conservation Areas'}
</button> </button>
<NumericDataEntryWithFormattedLink <hr/>
title={dataFields.planning_list_id.title} <LogicalDataEntry
slug="planning_list_id" slug='planning_heritage_at_risk'
value={props.building.planning_list_id} title={dataFields.planning_heritage_at_risk.title}
mode={props.mode} tooltip={dataFields.planning_heritage_at_risk.tooltip}
value={props.building.planning_heritage_at_risk}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
placeholder="add ID here"
linkTargetFunction={(id: String) => { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } }
linkDescriptionFunction={(id: String) => { return "ID Link" } }
/>
<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_grade.title}
slug="planning_list_grade"
value={props.building.planning_list_grade}
mode={props.mode} mode={props.mode}
disabled={false}
copy={props.copy}
onChange={props.onChange}
options={[
"I",
"II*",
"II",
"None"
]}
/> />
<Verification <Verification
slug="planning_list_grade" slug="planning_heritage_at_risk"
allow_verify={props.user !== undefined && props.building.planning_list_grade !== null && !props.edited} allow_verify={props.user !== undefined && props.building.planning_heritage_at_risk !== null && !props.edited}
onVerify={props.onVerify} onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_list_grade")} user_verified={props.user_verified.hasOwnProperty("planning_heritage_at_risk")}
user_verified_as={props.user_verified.planning_list_grade} user_verified_as={props.user_verified.planning_heritage_at_risk}
verified_count={props.building.verified.planning_list_grade} verified_count={props.building.verified.planning_heritage_at_risk}
/> />
{(props.building.planning_heritage_at_risk == null || props.building.planning_heritage_at_risk == false) ? <></> :
<>
<DataEntry <DataEntry
title={dataFields.planning_heritage_at_risk_url.title} title={dataFields.planning_heritage_at_risk_url.title}
slug="planning_heritage_at_risk_url" slug="planning_heritage_at_risk_url"
@ -319,6 +374,28 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.planning_heritage_at_risk_url} user_verified_as={props.user_verified.planning_heritage_at_risk_url}
verified_count={props.building.verified.planning_heritage_at_risk_url} verified_count={props.building.verified.planning_heritage_at_risk_url}
/> />
</>
}
<hr/>
<LogicalDataEntry
slug='planning_world_heritage_site'
title={dataFields.planning_world_heritage_site.title}
tooltip={dataFields.planning_world_heritage_site.tooltip}
value={props.building.planning_world_heritage_site}
copy={props.copy}
onChange={props.onChange}
mode={props.mode}
/>
<Verification
slug="planning_world_heritage_site"
allow_verify={props.user !== undefined && props.building.planning_world_heritage_site !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_world_heritage_site")}
user_verified_as={props.user_verified.planning_world_heritage_site}
verified_count={props.building.verified.planning_world_heritage_site}
/>
{(props.building.planning_world_heritage_site == null || props.building.planning_world_heritage_site == false) ? <></> :
<>
<NumericDataEntryWithFormattedLink <NumericDataEntryWithFormattedLink
title={dataFields.planning_world_list_id.title} title={dataFields.planning_world_list_id.title}
slug="planning_world_list_id" slug="planning_world_list_id"
@ -338,6 +415,28 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.planning_world_list_id} user_verified_as={props.user_verified.planning_world_list_id}
verified_count={props.building.verified.planning_world_list_id} verified_count={props.building.verified.planning_world_list_id}
/> />
</>
}
<hr/>
<LogicalDataEntry
slug='planning_local_list'
title={dataFields.planning_local_list.title}
tooltip={dataFields.planning_local_list.tooltip}
value={props.building.planning_local_list}
copy={props.copy}
onChange={props.onChange}
mode={props.mode}
/>
<Verification
slug="planning_local_list"
allow_verify={props.user !== undefined && props.building.planning_local_list !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_local_list")}
user_verified_as={props.user_verified.planning_local_list}
verified_count={props.building.verified.planning_local_list}
/>
{(props.building.planning_local_list == null || props.building.planning_local_list == false) ? <></> :
<>
<DataEntry <DataEntry
title={dataFields.planning_local_list_url.title} title={dataFields.planning_local_list_url.title}
slug="planning_local_list_url" slug="planning_local_list_url"
@ -356,26 +455,28 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.planning_local_list_url} user_verified_as={props.user_verified.planning_local_list_url}
verified_count={props.building.verified.planning_local_list_url} verified_count={props.building.verified.planning_local_list_url}
/> />
</>
{/* }
<DataEntry <hr/>
title={dataFields.planning_in_conservation_area_id.title} <LogicalDataEntry
slug="planning_in_conservation_area_id" slug='planning_in_conservation_area'
value={props.building.planning_in_conservation_area_id} title={dataFields.planning_in_conservation_area.title}
mode={props.mode} tooltip={dataFields.planning_in_conservation_area.tooltip}
value={props.building.planning_in_conservation_area}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
placeholder="Please add Conservation Area identifier" mode={props.mode}
/> />
<Verification <Verification
slug="planning_in_conservation_area_id" slug="planning_in_conservation_area"
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_id !== null && !props.edited} allow_verify={props.user !== undefined && props.building.planning_in_conservation_area !== null && !props.edited}
onVerify={props.onVerify} onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area_id")} user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area")}
user_verified_as={props.user_verified.planning_in_conservation_area_id} user_verified_as={props.user_verified.planning_in_conservation_area}
verified_count={props.building.verified.planning_in_conservation_area_id} verified_count={props.building.verified.planning_in_conservation_area}
/> />
*/} {(props.building.planning_in_conservation_area == null || props.building.planning_in_conservation_area == false) ? <></> :
<>
<DataEntry <DataEntry
title={dataFields.planning_in_conservation_area_url.title} title={dataFields.planning_in_conservation_area_url.title}
slug="planning_in_conservation_area_url" slug="planning_in_conservation_area_url"
@ -396,6 +497,28 @@ 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}
/> />
</>
}
<hr/>
<LogicalDataEntry
slug='planning_in_apa'
title={dataFields.planning_in_apa.title}
tooltip={dataFields.planning_in_apa.tooltip}
value={props.building.planning_in_apa}
copy={props.copy}
onChange={props.onChange}
mode={props.mode}
/>
<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}
/>
{(props.building.planning_in_apa == null || props.building.planning_in_apa == false) ? <></> :
<>
<DataEntry <DataEntry
title={dataFields.planning_in_apa_url.title} title={dataFields.planning_in_apa_url.title}
slug="planning_in_apa_url" slug="planning_in_apa_url"
@ -414,24 +537,79 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.planning_in_apa_url} user_verified_as={props.user_verified.planning_in_apa_url}
verified_count={props.building.verified.planning_in_apa_url} verified_count={props.building.verified.planning_in_apa_url}
/> />
{/* </>
<DataEntry }
title={dataFields.planning_conservation_area_name.title} <hr/>
slug="planning_conservation_area_name" <LogicalDataEntry
value={props.building.planning_conservation_area_name} slug='planning_scientific_interest'
title={dataFields.planning_scientific_interest.title}
tooltip={dataFields.planning_scientific_interest.tooltip}
value={props.building.planning_scientific_interest}
copy={props.copy}
onChange={props.onChange}
mode={props.mode}
/>
<Verification
slug="planning_scientific_interest"
allow_verify={props.user !== undefined && props.building.planning_scientific_interest !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_scientific_interest")}
user_verified_as={props.user_verified.planning_scientific_interest}
verified_count={props.building.verified.planning_scientific_interest}
/>
{(props.building.planning_scientific_interest == null || props.building.planning_scientific_interest == false) ? <></> :
<>
<SelectDataEntry
title={dataFields.planning_scientific_interest_source_type.title}
slug="planning_scientific_interest_source_type"
value={props.building.planning_scientific_interest_source_type}
mode={props.mode} mode={props.mode}
copy={props.copy} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
tooltip={dataFields.planning_scientific_interest_source_type.tooltip}
options={dataFields.planning_scientific_interest_source_type.items}
placeholder={dataFields.planning_scientific_interest_source_type.example}
/>
{(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) ? <></> :
<>
<MultiDataEntry
title={dataFields.planning_scientific_interest_source_links.title}
slug="planning_scientific_interest_source_links"
value={props.building.planning_scientific_interest_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.planning_scientific_interest_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</>
}
<hr/>
<LogicalDataEntry
slug='planning_historic_area_assessment'
title={dataFields.planning_historic_area_assessment.title}
tooltip={dataFields.planning_historic_area_assessment.tooltip}
value={props.building.planning_historic_area_assessment}
copy={props.copy}
onChange={props.onChange}
mode={props.mode}
/> />
<Verification <Verification
slug="planning_conservation_area_name" slug="planning_historic_area_assessment"
allow_verify={props.user !== undefined && props.building.planning_conservation_area_name !== null && !props.edited} allow_verify={props.user !== undefined && props.building.planning_historic_area_assessment !== null && !props.edited}
onVerify={props.onVerify} onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_conservation_area_name")} user_verified={props.user_verified.hasOwnProperty("planning_historic_area_assessment")}
user_verified_as={props.user_verified.planning_conservation_area_name} user_verified_as={props.user_verified.planning_historic_area_assessment}
verified_count={props.building.verified.planning_conservation_area_name} verified_count={props.building.verified.planning_historic_area_assessment}
/> />
*/} {(props.building.planning_historic_area_assessment == null || props.building.planning_historic_area_assessment == false) ? <></> :
<>
<DataEntry <DataEntry
title={dataFields.planning_historic_area_assessment_url.title} title={dataFields.planning_historic_area_assessment_url.title}
slug="planning_historic_area_assessment_url" slug="planning_historic_area_assessment_url"
@ -450,6 +628,8 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
user_verified_as={props.user_verified.planning_historic_area_assessment_url} user_verified_as={props.user_verified.planning_historic_area_assessment_url}
verified_count={props.building.verified.planning_historic_area_assessment_url} verified_count={props.building.verified.planning_historic_area_assessment_url}
/> />
</>
}
</DataEntryGroup> </DataEntryGroup>
<DataEntryGroup name="Land ownership" collapsed={true} > <DataEntryGroup name="Land ownership" collapsed={true} >
<InfoBox> <InfoBox>

View File

@ -16,6 +16,7 @@ export const commonSourceTypes = [
"Other independently managed public database", "Other independently managed public database",
"Commercial database", "Commercial database",
"Inferred computationally using existing open attribute data", "Inferred computationally using existing open attribute data",
"Synthetic data"
]; ];
/** /**
@ -361,7 +362,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
}, },
date_source: { date_source: {
category: Category.Age, category: Category.Age,
title: "Source type", title: "Historical source type",
tooltip: "Source type for the building dates above", tooltip: "Source type for the building dates above",
items: [ items: [
"Expert knowledge of building", "Expert knowledge of building",
@ -388,6 +389,19 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: "", example: "",
}, },
date_link: { date_link: {
category: Category.Age,
title: "Historical source link(s)",
tooltip: "URL for age and date reference",
example: ["", "", ""],
},
date_source_type: {
category: Category.Age,
title: "Source type",
tooltip: "Source type for the building dates above",
items: commonSourceTypes,
example: "",
},
date_source_links: {
category: Category.Age, category: Category.Age,
title: "Source link(s)", title: "Source link(s)",
tooltip: "URL for age and date reference", tooltip: "URL for age and date reference",
@ -695,13 +709,26 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
category: Category.Planning, category: Category.Planning,
title: "Has the work on this site been completed?", title: "Has the work on this site been completed?",
example: true, example: true,
//tooltip: , tooltip: "Has the work on this site been completed?",
}, },
planning_crowdsourced_site_completion_year: { planning_crowdsourced_site_completion_year: {
category: Category.Planning, category: Category.Planning,
title: "Year of completion if known", title: "Year of completion (best estimate)",
example: 2022, example: 2022,
//tooltip: , tooltip: "Year of completion, if known",
},
planning_crowdsourced_site_completion_source_type: {
category: Category.Team,
title: "Source type",
tooltip: "Source type for work complete data",
example: "",
items: commonSourceTypes
},
planning_crowdsourced_site_completion_source_links: {
category: Category.Team,
title: "Source links",
tooltip: "URL(s) for work complete data",
example: ["", "", ""],
}, },
planning_crowdsourced_planning_id: { planning_crowdsourced_planning_id: {
category: Category.Planning, category: Category.Planning,
@ -709,6 +736,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: "1112/QWERTY", example: "1112/QWERTY",
//tooltip: , //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: { planning_in_conservation_area_id: {
category: Category.Planning, category: Category.Planning,
title: "Conservation Area identifier", title: "Conservation Area identifier",
@ -739,9 +772,15 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: "", example: "",
//tooltip: , //tooltip: ,
}, },
planning_world_heritage_site: {
category: Category.Planning,
title: "Is the building on a World Heritage Site?",
tooltip: "Is the building on a <a href=\"https://historicengland.org.uk/advice/hpg/has/whs/\" target=\"_blank\">World Heritage Site</a>",
example: true,
},
planning_world_list_id: { planning_world_list_id: {
category: Category.Planning, category: Category.Planning,
title: "If the building is on a <a href=\"https://historicengland.org.uk/advice/hpg/has/whs/\" target=\"_blank\">World Heritage Site</a> please add the ID:", title: "If the building is on a World Heritage Site please add the ID:",
example: "488", example: "488",
//tooltip: , //tooltip: ,
}, },
@ -751,18 +790,36 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: "", example: "",
//tooltip: , //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: { planning_in_apa_url: {
category: Category.Planning, category: Category.Planning,
title: "Is the building in an area of archaeological priority?", title: "Is the building in an area of archaeological priority?",
example: "", example: "",
//tooltip: , //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: { planning_local_list_url: {
category: Category.Planning, category: Category.Planning,
title: "Is the building a locally listed heritage asset?", title: "Is the building a locally listed heritage asset?",
example: "", example: "",
//tooltip: , //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: { planning_historic_area_assessment_url: {
category: Category.Planning, category: Category.Planning,
title: "Does it have any other type of designation?", title: "Does it have any other type of designation?",
@ -775,6 +832,45 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
example: true, example: true,
//tooltip: , //tooltip: ,
}, },
planning_missing_data: {
category: Category.Planning,
title: "Is information on a planning application relating to this building missing?",
tooltip: "Is information on a planning application relating to this building missing?",
example: true,
},
planning_missing_data_links: {
category: Category.Team,
title: "Source links",
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: { is_domestic: {
category: Category.Team, category: Category.Team,
title: "Is the building a home/residential building?", title: "Is the building a home/residential building?",

View File

@ -78,6 +78,11 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
text: "About the Colouring Cities Research Programme", text: "About the Colouring Cities Research Programme",
external: true external: true
}, },
{
to: config.manualURL,
text: "About the Colouring " + config.cityName + " Project",
external: true
},
{ {
to: "https://github.com/colouring-cities/manual/wiki/A2.-How-to%3F-Guides", to: "https://github.com/colouring-cities/manual/wiki/A2.-How-to%3F-Guides",
text: "How to Use", text: "How to Use",

View File

@ -13,3 +13,22 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS energy_solar_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS energy_green_roof; ALTER TABLE buildings DROP COLUMN IF EXISTS energy_green_roof;
ALTER TABLE buildings DROP COLUMN IF EXISTS energy_green_roof_source_type; ALTER TABLE buildings DROP COLUMN IF EXISTS energy_green_roof_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS energy_green_roof_source_links; ALTER TABLE buildings DROP COLUMN IF EXISTS energy_green_roof_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_site_completion_source_type;
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;

View File

@ -13,3 +13,22 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_solar_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_green_roof boolean; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_green_roof boolean;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_green_roof_source_type text; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_green_roof_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_green_roof_source_links text[]; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_green_roof_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_crowdsourced_site_completion_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_crowdsourced_site_completion_source_links text[];
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[];
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[];

View File

@ -5,3 +5,10 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS context_flats_garden;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_front_garden boolean; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_front_garden boolean;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_back_garden boolean; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_back_garden boolean;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_flats_garden boolean; ALTER TABLE buildings ADD COLUMN IF NOT EXISTS context_flats_garden boolean;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_site_completion_status;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_crowdsourced_site_completion_status boolean;
ALTER TABLE buildings DROP COLUMN IF EXISTS planning_crowdsourced_site_completion_year;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS planning_crowdsourced_site_completion_year smallint;