2019-08-23 09:09:23 -04:00
|
|
|
import React, { Fragment } from 'react';
|
2019-08-14 14:33:26 -04:00
|
|
|
|
2020-02-10 18:39:51 -05:00
|
|
|
import InfoBox from '../../components/info-box';
|
2021-02-22 01:59:24 -05:00
|
|
|
import { dataFields } from '../../config/data-fields-config';
|
2019-08-23 12:35:17 -04:00
|
|
|
import CheckboxDataEntry from '../data-components/checkbox-data-entry';
|
2022-09-23 10:03:08 -04:00
|
|
|
import NumericDataEntryWithFormattedLink from '../data-components/numeric-data-entry-with-formatted-link';import DataEntry from '../data-components/data-entry';
|
2019-10-08 09:20:43 -04:00
|
|
|
import { DataEntryGroup } from '../data-components/data-entry-group';
|
2019-11-07 02:39:26 -05:00
|
|
|
import SelectDataEntry from '../data-components/select-data-entry';
|
2020-08-04 14:11:08 -04:00
|
|
|
import Verification from '../data-components/verification';
|
2019-11-07 02:39:26 -05:00
|
|
|
import withCopyEdit from '../data-container';
|
|
|
|
|
2019-10-18 10:06:50 -04:00
|
|
|
import { CategoryViewProps } from './category-view-props';
|
2019-08-14 14:33:26 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Planning view/edit section
|
|
|
|
*/
|
2019-10-18 10:06:50 -04:00
|
|
|
const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
2019-08-23 09:09:23 -04:00
|
|
|
<Fragment>
|
2022-07-04 13:14:40 -04:00
|
|
|
<InfoBox type='warning'>
|
|
|
|
This section is under development as part of the project CLPV Tool. For more details and progress <a href="https://github.com/colouring-cities/manual/wiki/G2.-Data-capture-(2).-Live-streaming-and-automated-methods">read here</a>.
|
|
|
|
</InfoBox>
|
2019-08-14 17:39:46 -04:00
|
|
|
<DataEntry
|
2019-10-25 12:43:39 -04:00
|
|
|
title={dataFields.planning_portal_link.title}
|
2019-08-14 17:39:46 -04:00
|
|
|
slug="planning_portal_link"
|
|
|
|
value={props.building.planning_portal_link}
|
2019-08-23 12:35:17 -04:00
|
|
|
mode={props.mode}
|
2019-08-14 17:39:46 -04:00
|
|
|
copy={props.copy}
|
2019-08-23 12:35:17 -04:00
|
|
|
onChange={props.onChange}
|
2019-08-14 17:39:46 -04:00
|
|
|
/>
|
2020-08-04 14:11:08 -04:00
|
|
|
<Verification
|
|
|
|
slug="planning_portal_link"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_portal_link !== null && !props.edited}
|
|
|
|
onVerify={props.onVerify}
|
|
|
|
user_verified={props.user_verified.hasOwnProperty("planning_portal_link")}
|
|
|
|
user_verified_as={props.user_verified.planning_portal_link}
|
|
|
|
verified_count={props.building.verified.planning_portal_link}
|
|
|
|
/>
|
|
|
|
|
2020-02-10 18:39:51 -05:00
|
|
|
<DataEntryGroup name="Planning Status">
|
|
|
|
<CheckboxDataEntry
|
|
|
|
title="Is a planning application live for this site?"
|
|
|
|
slug="planning_live_application"
|
|
|
|
value={null}
|
2022-07-25 05:04:04 -04:00
|
|
|
disabled={false}
|
2020-02-10 18:39:51 -05:00
|
|
|
/>
|
|
|
|
<CheckboxDataEntry
|
|
|
|
title={dataFields.planning_demolition_proposed.title}
|
|
|
|
slug="planning_demolition_proposed"
|
|
|
|
value={props.building.planning_demolition_proposed}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-07-25 05:04:04 -04:00
|
|
|
disabled={false}
|
2020-02-10 18:39:51 -05:00
|
|
|
/>
|
|
|
|
<CheckboxDataEntry
|
|
|
|
title="Has this application recently been been approved/refused?"
|
|
|
|
slug="planning_recent_outcome"
|
|
|
|
value={null}
|
2022-07-25 05:04:04 -04:00
|
|
|
disabled={false}
|
2020-02-10 18:39:51 -05:00
|
|
|
/>
|
|
|
|
<CheckboxDataEntry
|
|
|
|
title="Has the work been carried out?"
|
|
|
|
slug="planning_carried_out"
|
|
|
|
value={null}
|
2022-07-25 05:04:04 -04:00
|
|
|
disabled={false}
|
2020-02-10 18:39:51 -05:00
|
|
|
/>
|
|
|
|
<InfoBox msg="For historical planning applications see Planning Portal link" />
|
2020-08-04 14:11:08 -04:00
|
|
|
{/*
|
2020-02-10 18:39:51 -05:00
|
|
|
Move to Demolition:
|
|
|
|
|
|
|
|
<CheckboxDataEntry
|
|
|
|
title={dataFields.planning_demolition_complete.title}
|
|
|
|
slug="planning_demolition_complete"
|
|
|
|
value={props.building.planning_demolition_complete}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-07-25 05:04:04 -04:00
|
|
|
disabled={false}
|
2020-02-10 18:39:51 -05:00
|
|
|
/>
|
|
|
|
<DataEntry
|
|
|
|
title={dataFields.planning_demolition_history.title}
|
|
|
|
slug="planning_demolition_history"
|
|
|
|
value={props.building.planning_demolition_history}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-07-25 05:04:04 -04:00
|
|
|
disabled={false}
|
2020-02-10 18:39:51 -05:00
|
|
|
/>
|
|
|
|
*/}
|
|
|
|
</DataEntryGroup>
|
2022-09-20 03:24:16 -04:00
|
|
|
<DataEntryGroup name="Designation/protection" collapsed={false} >
|
|
|
|
<DataEntryGroup name="Conservation" collapsed={false} >
|
2022-09-20 04:34:22 -04:00
|
|
|
<DataEntry
|
|
|
|
title={dataFields.planning_in_conservation_area_url.title}
|
|
|
|
slug="planning_in_conservation_area_url"
|
|
|
|
value={props.building.planning_in_conservation_area_url}
|
2022-09-20 03:25:31 -04:00
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-09-20 04:34:22 -04:00
|
|
|
isUrl={true}
|
|
|
|
placeholder="https://..."
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<Verification
|
2022-09-20 04:34:22 -04:00
|
|
|
slug="planning_in_conservation_area_url"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_in_conservation_area_url !== null && !props.edited}
|
2022-09-20 03:25:31 -04:00
|
|
|
onVerify={props.onVerify}
|
2022-09-20 04:34:22 -04:00
|
|
|
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}
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<DataEntry
|
|
|
|
title={dataFields.planning_conservation_area_name.title}
|
|
|
|
slug="planning_conservation_area_name"
|
|
|
|
value={props.building.planning_conservation_area_name}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
|
|
|
/>
|
|
|
|
<Verification
|
|
|
|
slug="planning_conservation_area_name"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_conservation_area_name !== null && !props.edited}
|
|
|
|
onVerify={props.onVerify}
|
|
|
|
user_verified={props.user_verified.hasOwnProperty("planning_conservation_area_name")}
|
|
|
|
user_verified_as={props.user_verified.planning_conservation_area_name}
|
|
|
|
verified_count={props.building.verified.planning_conservation_area_name}
|
|
|
|
/>
|
2022-09-20 03:24:16 -04:00
|
|
|
</DataEntryGroup>
|
|
|
|
<DataEntryGroup name="Listed buildings & scheduled monuments" collapsed={false} >
|
2022-09-23 10:03:08 -04:00
|
|
|
<NumericDataEntryWithFormattedLink
|
|
|
|
title={dataFields.planning_list_id.title}
|
|
|
|
slug="planning_list_id"
|
|
|
|
value={props.building.planning_list_id}
|
2022-09-20 03:25:31 -04:00
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-09-23 10:39:34 -04:00
|
|
|
placeholder="If yes, add ID"
|
2022-09-23 10:03:08 -04:00
|
|
|
linkTargetFunction={(id: String) => { return "https://historicengland.org.uk/listing/the-list/list-entry/" + id + "?section=official-list-entry" } }
|
2022-09-23 10:39:34 -04:00
|
|
|
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
2022-09-23 10:03:08 -04:00
|
|
|
/>
|
2022-09-20 03:25:31 -04:00
|
|
|
<Verification
|
2022-09-23 10:03:08 -04:00
|
|
|
slug="planning_list_id"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_list_id !== null && !props.edited}
|
2022-09-20 03:25:31 -04:00
|
|
|
onVerify={props.onVerify}
|
2022-09-23 10:03:08 -04:00
|
|
|
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}
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<SelectDataEntry
|
|
|
|
title={dataFields.planning_list_grade.title}
|
|
|
|
slug="planning_list_grade"
|
|
|
|
value={props.building.planning_list_grade}
|
|
|
|
mode={props.mode}
|
|
|
|
disabled={false}
|
|
|
|
copy={props.copy}
|
|
|
|
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
|
2022-09-20 04:34:22 -04:00
|
|
|
title={dataFields.planning_heritage_at_risk_url.title}
|
|
|
|
slug="planning_heritage_at_risk_url"
|
|
|
|
value={props.building.planning_heritage_at_risk_url}
|
2022-09-20 03:25:31 -04:00
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-09-21 14:31:27 -04:00
|
|
|
placeholder="https://..."
|
|
|
|
isUrl={true}
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<Verification
|
2022-09-20 04:34:22 -04:00
|
|
|
slug="planning_heritage_at_risk_url"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_heritage_at_risk_url !== null && !props.edited}
|
2022-09-20 03:25:31 -04:00
|
|
|
onVerify={props.onVerify}
|
2022-09-20 04:34:22 -04:00
|
|
|
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}
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
2022-09-20 04:34:22 -04:00
|
|
|
</DataEntryGroup>
|
|
|
|
<DataEntryGroup name="Other types of protection & recording" collapsed={false} >
|
2022-09-20 03:25:31 -04:00
|
|
|
<DataEntry
|
2022-09-20 04:34:22 -04:00
|
|
|
title={dataFields.planning_local_list_url.title}
|
|
|
|
slug="planning_local_list_url"
|
|
|
|
value={props.building.planning_local_list_url}
|
2022-09-20 03:25:31 -04:00
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-09-20 04:34:22 -04:00
|
|
|
isUrl={true}
|
|
|
|
placeholder="https://..."
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<Verification
|
2022-09-20 04:34:22 -04:00
|
|
|
slug="planning_local_list_url"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_local_list_url !== null && !props.edited}
|
2022-09-20 03:25:31 -04:00
|
|
|
onVerify={props.onVerify}
|
2022-09-20 04:34:22 -04:00
|
|
|
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}
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
2022-09-24 06:37:58 -04:00
|
|
|
<NumericDataEntryWithFormattedLink
|
|
|
|
title={dataFields.planning_world_list_id.title}
|
|
|
|
slug="planning_world_list_id"
|
|
|
|
value={props.building.planning_world_list_id}
|
2022-09-20 03:25:31 -04:00
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-09-24 06:37:58 -04:00
|
|
|
placeholder="If yes, add ID"
|
|
|
|
linkTargetFunction={(id: String) => { return "https://whc.unesco.org/en/list/" + id } }
|
|
|
|
linkDescriptionFunction={(id: String) => { return "ID Link" } }
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<Verification
|
2022-09-24 06:37:58 -04:00
|
|
|
slug="planning_world_list_id"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_world_list_id !== null && !props.edited}
|
2022-09-20 03:25:31 -04:00
|
|
|
onVerify={props.onVerify}
|
2022-09-24 06:37:58 -04:00
|
|
|
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}
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
2022-09-20 04:34:22 -04:00
|
|
|
|
2022-09-20 03:25:31 -04:00
|
|
|
<DataEntry
|
|
|
|
title={dataFields.planning_glher_url.title}
|
|
|
|
slug="planning_glher_url"
|
|
|
|
value={props.building.planning_glher_url}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-09-20 04:34:22 -04:00
|
|
|
isUrl={true}
|
|
|
|
placeholder="https://..."
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<Verification
|
|
|
|
slug="planning_glher_url"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_glher_url !== null && !props.edited}
|
|
|
|
onVerify={props.onVerify}
|
|
|
|
user_verified={props.user_verified.hasOwnProperty("planning_glher_url")}
|
|
|
|
user_verified_as={props.user_verified.planning_glher_url}
|
|
|
|
verified_count={props.building.verified.planning_glher_url}
|
|
|
|
/>
|
2020-08-04 14:11:08 -04:00
|
|
|
|
2022-09-20 03:25:31 -04:00
|
|
|
<DataEntry
|
2022-09-20 04:34:22 -04:00
|
|
|
title={dataFields.planning_in_apa_url.title}
|
|
|
|
slug="planning_in_apa_url"
|
|
|
|
value={props.building.planning_in_apa_url}
|
2022-09-20 03:25:31 -04:00
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
2022-09-20 04:34:22 -04:00
|
|
|
isUrl={true}
|
|
|
|
placeholder="https://..."
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<Verification
|
2022-09-20 04:34:22 -04:00
|
|
|
slug="planning_in_apa_url"
|
|
|
|
allow_verify={props.user !== undefined && props.building.planning_in_apa_url !== null && !props.edited}
|
2022-09-20 03:25:31 -04:00
|
|
|
onVerify={props.onVerify}
|
2022-09-20 04:34:22 -04:00
|
|
|
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}
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<DataEntry
|
|
|
|
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}
|
2022-09-20 04:34:22 -04:00
|
|
|
isUrl={true}
|
|
|
|
placeholder="https://..."
|
2022-09-20 03:25:31 -04:00
|
|
|
/>
|
|
|
|
<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}
|
|
|
|
/>
|
2022-09-20 03:24:16 -04:00
|
|
|
</DataEntryGroup>
|
2019-10-08 09:20:43 -04:00
|
|
|
</DataEntryGroup>
|
2019-08-23 09:09:23 -04:00
|
|
|
</Fragment>
|
2019-11-07 03:13:30 -05:00
|
|
|
);
|
2019-08-14 14:33:26 -04:00
|
|
|
const PlanningContainer = withCopyEdit(PlanningView);
|
|
|
|
|
2019-11-07 03:13:30 -05:00
|
|
|
export default PlanningContainer;
|