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
@ -179,41 +256,41 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
</i> </i>
</div> </div>
<LogicalDataEntry <LogicalDataEntry
title="Is the building inside a Flood Zone?" title="Is the building inside a Flood Zone?"
slug="planning_live_application" slug="planning_live_application"
value={null} value={null}
disabled={true} disabled={true}
tooltip={"the GLA official description: \"All areas with more than a 1 in 1,000 annual probability of either river or sea flooding.\""} tooltip={"the GLA official description: \"All areas with more than a 1 in 1,000 annual probability of either river or sea flooding.\""}
/> />
<button className={`map-switcher-inline ${flood}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={floodSwitchOnClick}> <button className={`map-switcher-inline ${flood}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={floodSwitchOnClick}>
{(flood === 'enabled')? 'Click to hide Flood Zones' : 'Click to see Flood Zones mapped'} {(flood === 'enabled')? 'Click to hide Flood Zones' : 'Click to see Flood Zones mapped'}
</button> </button>
<LogicalDataEntry <LogicalDataEntry
title="Is the building in a Housing Zone?" title="Is the building in a Housing Zone?"
slug="planning_live_application" slug="planning_live_application"
value={null} value={null}
disabled={true} disabled={true}
tooltip={"the GLA official description: \"Housing zones are areas funded by the Mayor and government to attract developers and relevant partners to build new homes.\""} tooltip={"the GLA official description: \"Housing zones are areas funded by the Mayor and government to attract developers and relevant partners to build new homes.\""}
/> />
<button className={`map-switcher-inline ${housing}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={housingSwitchOnClick}> <button className={`map-switcher-inline ${housing}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={housingSwitchOnClick}>
{(housing === 'enabled')? 'Click to hide Housing Zones' : 'Click to see Housing Zones mapped'} {(housing === 'enabled')? 'Click to hide Housing Zones' : 'Click to see Housing Zones mapped'}
</button> </button>
<LogicalDataEntry <LogicalDataEntry
title="Is the building in a Creative Enterprise Zone?" title="Is the building in a Creative Enterprise Zone?"
slug="planning_live_application" slug="planning_live_application"
value={null} value={null}
disabled={true} disabled={true}
tooltip={"GLA official description: \"Creative Enterprise Zones are a new Mayoral initiative to designate areas of London where artists and creative businesses can find permanent affordable space to work; are supported to start-up and grow; and where local people are helped to learn creative sector skills and find new jobs.\""} tooltip={"GLA official description: \"Creative Enterprise Zones are a new Mayoral initiative to designate areas of London where artists and creative businesses can find permanent affordable space to work; are supported to start-up and grow; and where local people are helped to learn creative sector skills and find new jobs.\""}
/> />
<button className={`map-switcher-inline ${creative}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={creativeSwitchOnClick}> <button className={`map-switcher-inline ${creative}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={creativeSwitchOnClick}>
{(creative === 'enabled')? 'Click to hide Creative Enterprise Zones' : 'Click to see Creative Enterprise Zones'} {(creative === 'enabled')? 'Click to hide Creative Enterprise Zones' : 'Click to see Creative Enterprise Zones'}
</button> </button>
<LogicalDataEntry <LogicalDataEntry
title="Is the building within a Protected Vista?" title="Is the building within a Protected Vista?"
slug="planning_live_application" slug="planning_live_application"
value={null} value={null}
disabled={true} disabled={true}
tooltip={"GLA official description: \"The Protected Vistas are established in the London Plan with more detailed guidance provided in the London View Management Framework (LVMF). The London Plan seeks to protect the significant views which help to define London, including the panoramas, linear views and townscape views in this layer.\""} tooltip={"GLA official description: \"The Protected Vistas are established in the London Plan with more detailed guidance provided in the London View Management Framework (LVMF). The London Plan seeks to protect the significant views which help to define London, including the panoramas, linear views and townscape views in this layer.\""}
/> />
<button className={`map-switcher-inline ${vista}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={vistaSwitchOnClick}> <button className={`map-switcher-inline ${vista}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={vistaSwitchOnClick}>
{(vista === 'enabled')? 'Click to hide Protected Vistas' : 'Click to see Protected Vistas'} {(vista === 'enabled')? 'Click to hide Protected Vistas' : 'Click to see Protected Vistas'}
@ -258,198 +335,301 @@ 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" mode={props.mode}
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 <Verification
slug="planning_list_id" slug="planning_heritage_at_risk"
allow_verify={props.user !== undefined && props.building.planning_list_id !== 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_id")} user_verified={props.user_verified.hasOwnProperty("planning_heritage_at_risk")}
user_verified_as={props.user_verified.planning_list_id} user_verified_as={props.user_verified.planning_heritage_at_risk}
verified_count={props.building.verified.planning_list_id} verified_count={props.building.verified.planning_heritage_at_risk}
/> />
<SelectDataEntry {(props.building.planning_heritage_at_risk == null || props.building.planning_heritage_at_risk == false) ? <></> :
title={dataFields.planning_list_grade.title} <>
slug="planning_list_grade" <DataEntry
value={props.building.planning_list_grade} title={dataFields.planning_heritage_at_risk_url.title}
mode={props.mode} slug="planning_heritage_at_risk_url"
disabled={false} value={props.building.planning_heritage_at_risk_url}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
placeholder="Please add relevant link here"
isUrl={true}
/>
<Verification
slug="planning_heritage_at_risk_url"
allow_verify={props.user !== undefined && props.building.planning_heritage_at_risk_url !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("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}
/>
</>
}
<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} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
options={[
"I",
"II*",
"II",
"None"
]}
/>
<Verification
slug="planning_list_grade"
allow_verify={props.user !== undefined && props.building.planning_list_grade !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_list_grade")}
user_verified_as={props.user_verified.planning_list_grade}
verified_count={props.building.verified.planning_list_grade}
/>
<DataEntry
title={dataFields.planning_heritage_at_risk_url.title}
slug="planning_heritage_at_risk_url"
value={props.building.planning_heritage_at_risk_url}
mode={props.mode} 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
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}
placeholder="add ID here"
linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } }
linkDescriptionFunction={(id: String) => { return "ID Link" } }
/>
<Verification
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_id")}
user_verified_as={props.user_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} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
placeholder="Please add relevant link here"
isUrl={true}
/>
<Verification
slug="planning_heritage_at_risk_url"
allow_verify={props.user !== undefined && props.building.planning_heritage_at_risk_url !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("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}
/>
<NumericDataEntryWithFormattedLink
title={dataFields.planning_world_list_id.title}
slug="planning_world_list_id"
value={props.building.planning_world_list_id}
mode={props.mode} 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
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}
isUrl={true}
placeholder="Please add relevant link here"
/>
<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}
/>
</>
}
<hr/>
<LogicalDataEntry
slug='planning_in_conservation_area'
title={dataFields.planning_in_conservation_area.title}
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="add ID here"
linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } }
linkDescriptionFunction={(id: String) => { return "ID Link" } }
/>
<Verification
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_id")}
user_verified_as={props.user_verified.planning_world_list_id}
verified_count={props.building.verified.planning_world_list_id}
/>
<DataEntry
title={dataFields.planning_local_list_url.title}
slug="planning_local_list_url"
value={props.building.planning_local_list_url}
mode={props.mode} mode={props.mode}
/>
<Verification
slug="planning_in_conservation_area"
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area")}
user_verified_as={props.user_verified.planning_in_conservation_area}
verified_count={props.building.verified.planning_in_conservation_area}
/>
{(props.building.planning_in_conservation_area == null || props.building.planning_in_conservation_area == false) ? <></> :
<>
<DataEntry
title={dataFields.planning_in_conservation_area_url.title}
slug="planning_in_conservation_area_url"
value={props.building.planning_in_conservation_area_url}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
isUrl={true}
placeholder="Please add CA appraisal link here"
/>
{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 authoritys 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 authoritys CA appraisal link and then click verify." : "" }
<Verification
slug="planning_in_conservation_area_url"
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_url !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("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}
/>
</>
}
<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} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
isUrl={true}
placeholder="Please add relevant link here"
/>
<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}
/>
{/*
<DataEntry
title={dataFields.planning_in_conservation_area_id.title}
slug="planning_in_conservation_area_id"
value={props.building.planning_in_conservation_area_id}
mode={props.mode} 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
title={dataFields.planning_in_apa_url.title}
slug="planning_in_apa_url"
value={props.building.planning_in_apa_url}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
isUrl={true}
placeholder="Please add relevant link here"
/>
<Verification
slug="planning_in_apa_url"
allow_verify={props.user !== undefined && props.building.planning_in_apa_url !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_in_apa_url")}
user_verified_as={props.user_verified.planning_in_apa_url}
verified_count={props.building.verified.planning_in_apa_url}
/>
</>
}
<hr/>
<LogicalDataEntry
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} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
placeholder="Please add Conservation Area identifier"
/>
<Verification
slug="planning_in_conservation_area_id"
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_id !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("planning_in_conservation_area_id")}
user_verified_as={props.user_verified.planning_in_conservation_area_id}
verified_count={props.building.verified.planning_in_conservation_area_id}
/>
*/}
<DataEntry
title={dataFields.planning_in_conservation_area_url.title}
slug="planning_in_conservation_area_url"
value={props.building.planning_in_conservation_area_url}
mode={props.mode} 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}
copy={props.copy}
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} copy={props.copy}
onChange={props.onChange} onChange={props.onChange}
isUrl={true}
placeholder="Please add CA appraisal link here"
/>
{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 authoritys 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 authoritys CA appraisal link and then click verify." : "" }
<Verification
slug="planning_in_conservation_area_url"
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_url !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("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}
/>
<DataEntry
title={dataFields.planning_in_apa_url.title}
slug="planning_in_apa_url"
value={props.building.planning_in_apa_url}
mode={props.mode} mode={props.mode}
copy={props.copy} />
onChange={props.onChange}
isUrl={true}
placeholder="Please add relevant link here"
/>
<Verification <Verification
slug="planning_in_apa_url" slug="planning_historic_area_assessment"
allow_verify={props.user !== undefined && props.building.planning_in_apa_url !== 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_in_apa_url")} user_verified={props.user_verified.hasOwnProperty("planning_historic_area_assessment")}
user_verified_as={props.user_verified.planning_in_apa_url} user_verified_as={props.user_verified.planning_historic_area_assessment}
verified_count={props.building.verified.planning_in_apa_url} verified_count={props.building.verified.planning_historic_area_assessment}
/> />
{/* {(props.building.planning_historic_area_assessment == null || props.building.planning_historic_area_assessment == false) ? <></> :
<DataEntry <>
title={dataFields.planning_conservation_area_name.title} <DataEntry
slug="planning_conservation_area_name" title={dataFields.planning_historic_area_assessment_url.title}
value={props.building.planning_conservation_area_name} slug="planning_historic_area_assessment_url"
mode={props.mode} value={props.building.planning_historic_area_assessment_url}
copy={props.copy} mode={props.mode}
onChange={props.onChange} copy={props.copy}
/> onChange={props.onChange}
<Verification isUrl={true}
slug="planning_conservation_area_name" placeholder="Please add relevant link here"
allow_verify={props.user !== undefined && props.building.planning_conservation_area_name !== null && !props.edited} />
onVerify={props.onVerify} <Verification
user_verified={props.user_verified.hasOwnProperty("planning_conservation_area_name")} slug="planning_historic_area_assessment_url"
user_verified_as={props.user_verified.planning_conservation_area_name} allow_verify={props.user !== undefined && props.building.planning_historic_area_assessment_url !== null && !props.edited}
verified_count={props.building.verified.planning_conservation_area_name} onVerify={props.onVerify}
/> user_verified={props.user_verified.hasOwnProperty("planning_historic_area_assessment_url")}
*/} user_verified_as={props.user_verified.planning_historic_area_assessment_url}
<DataEntry verified_count={props.building.verified.planning_historic_area_assessment_url}
title={dataFields.planning_historic_area_assessment_url.title} />
slug="planning_historic_area_assessment_url" </>
value={props.building.planning_historic_area_assessment_url} }
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
isUrl={true}
placeholder="Please add relevant link here"
/>
<Verification
slug="planning_historic_area_assessment_url"
allow_verify={props.user !== undefined && props.building.planning_historic_area_assessment_url !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("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}
/>
</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

@ -12,4 +12,23 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS energy_solar_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS energy_solar_source_links; 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

@ -12,4 +12,23 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_solar_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_solar_source_links text[]; 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

@ -4,4 +4,11 @@ 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;