Activate fields in Planning Section
- Year of Completion #1197 - Incomplete/missing data #1198
This commit is contained in:
parent
1e41cc2e11
commit
9b73dd5e62
@ -285,6 +285,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: 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: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
@ -333,6 +341,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
planning_missing_data: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
planning_missing_data_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
sust_breeam_rating: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
|
@ -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 communityLinkUrl = `/${props.mode}/${Category.Community}/${props.building.building_id}`;
|
||||
const currentYear = new Date().getFullYear();
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<DataEntryGroup name="Current planning applications" collapsed={true} >
|
||||
@ -88,36 +90,111 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Year of completion" collapsed={true} >
|
||||
<DataEntry
|
||||
title="Was the building completed?"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip='Coming Soon'
|
||||
<LogicalDataEntry
|
||||
slug='planning_crowdsourced_site_completion_status'
|
||||
title={dataFields.planning_crowdsourced_site_completion_status.title}
|
||||
tooltip={dataFields.planning_crowdsourced_site_completion_status.tooltip}
|
||||
value={props.building.planning_crowdsourced_site_completion_status}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Year of completion"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip='Coming Soon'
|
||||
<Verification
|
||||
slug="planning_crowdsourced_site_completion_status"
|
||||
allow_verify={props.user !== undefined && props.building.planning_crowdsourced_site_completion_status !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_crowdsourced_site_completion_status")}
|
||||
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 name="Incomplete/missing data" collapsed={true} >
|
||||
<DataEntry
|
||||
title="Is information on a planning application relating to this building missing?"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip='Coming Soon'
|
||||
<LogicalDataEntry
|
||||
slug='planning_missing_data'
|
||||
title={dataFields.planning_missing_data.title}
|
||||
tooltip={dataFields.planning_missing_data.tooltip}
|
||||
value={props.building.planning_missing_data}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
mode={props.mode}
|
||||
/>
|
||||
<DataEntry
|
||||
title="Link (to correct data)"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
tooltip='Coming Soon'
|
||||
<Verification
|
||||
slug="planning_missing_data"
|
||||
allow_verify={props.user !== undefined && props.building.planning_missing_data !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("planning_missing_data")}
|
||||
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>
|
||||
If you feel there are incorrect or missing data relating to this building please contact:
|
||||
planningdata@London.gov.uk
|
||||
|
@ -695,13 +695,26 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
category: Category.Planning,
|
||||
title: "Has the work on this site been completed?",
|
||||
example: true,
|
||||
//tooltip: ,
|
||||
tooltip: "Has the work on this site been completed?",
|
||||
},
|
||||
planning_crowdsourced_site_completion_year: {
|
||||
category: Category.Planning,
|
||||
title: "Year of completion if known",
|
||||
title: "Year of completion (best estimate)",
|
||||
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: {
|
||||
category: Category.Planning,
|
||||
@ -775,6 +788,20 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
example: true,
|
||||
//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: ["", "", ""],
|
||||
},
|
||||
|
||||
|
||||
is_domestic: {
|
||||
category: Category.Team,
|
||||
title: "Is the building a home/residential building?",
|
||||
|
@ -13,3 +13,8 @@ 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_source_type;
|
||||
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;
|
||||
|
@ -13,3 +13,8 @@ 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_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 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[];
|
@ -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_back_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;
|
||||
|
Loading…
Reference in New Issue
Block a user