Merge pull request #1200 from colouring-cities/interface/ui-tweaks
Interface/UI tweaks
This commit is contained in:
commit
f855c8d3f2
app/src
api/config
frontend
building
data-components
data-containers
age-history.tsxcommunity.tsxenergy-performance.tsxland-use.tsxlocation.tsxplanning.tsxsize.tsxstreet-context.tsxteam.tsx
sidebar.cssconfig
header.tsxmaintenance/extract_data
migrations
@ -59,6 +59,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
},
|
},
|
||||||
|
location_name_link: {
|
||||||
|
edit: true,
|
||||||
|
verify: true,
|
||||||
|
},
|
||||||
location_number: {
|
location_number: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
@ -103,6 +107,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
},
|
},
|
||||||
|
location_alternative_footprint_links: {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
date_year: {
|
date_year: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true,
|
verify: true,
|
||||||
@ -482,6 +490,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
},
|
},
|
||||||
|
developer_links: {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
developer_source_type: {
|
developer_source_type: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
@ -494,6 +506,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
},
|
},
|
||||||
|
landowner_links: {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
landowner_source_type: {
|
landowner_source_type: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
@ -506,6 +522,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
},
|
},
|
||||||
|
designers_links: {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
designers_source_type: {
|
designers_source_type: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
@ -530,6 +550,10 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
},
|
},
|
||||||
|
builder_links: {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
builder_source_type: {
|
builder_source_type: {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
@ -685,6 +709,38 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
|||||||
age_retrofit_date_source_links : {
|
age_retrofit_date_source_links : {
|
||||||
edit: true,
|
edit: true,
|
||||||
verify: true
|
verify: true
|
||||||
|
},
|
||||||
|
age_historical_raster_map_links : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
|
age_historical_vectorised_footprint_links : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
|
energy_solar : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
|
energy_solar_source_type : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
|
energy_solar_source_links : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
|
energy_green_roof : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
|
energy_green_roof_source_type : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
|
},
|
||||||
|
energy_green_roof_source_links : {
|
||||||
|
edit: true,
|
||||||
|
verify: true
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -69,83 +69,89 @@ export const MultiDataEntry: React.FC<MultiDataEntryProps> = ({
|
|||||||
copy={copyable ? props.copy : undefined}
|
copy={copyable ? props.copy : undefined}
|
||||||
/>
|
/>
|
||||||
<div id={`${props.slug}-wrapper`}>
|
<div id={`${props.slug}-wrapper`}>
|
||||||
|
{
|
||||||
|
values.length === 0 && !isEditing &&
|
||||||
|
<div className="input-group">
|
||||||
|
<input className="form-control no-entries" type="text" value="No entries" disabled={true} />
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<ul className="data-entry-list">
|
||||||
{
|
{
|
||||||
values.length === 0 && !isEditing &&
|
isEditing && isDisabled && values.length === 0 &&
|
||||||
<div className="input-group">
|
<div className="input-group">
|
||||||
<input className="form-control no-entries" type="text" value="No entries" disabled={true} />
|
<input className="form-control no-entries" type="text" value="Please add a link below" disabled={true} />
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
<ul className="data-entry-list">
|
{
|
||||||
{
|
values.map((val, i) => (
|
||||||
values.map((val, i) => (
|
<li className="input-group" key={i /* i as key prevents input component recreation on edit */}>
|
||||||
<li className="input-group" key={i /* i as key prevents input component recreation on edit */}>
|
<DataEntryInput
|
||||||
<DataEntryInput
|
slug={props.slug}
|
||||||
slug={props.slug}
|
name={`${slugWithModifier}-${i}`}
|
||||||
name={`${slugWithModifier}-${i}`}
|
id={`${slugWithModifier}-${i}`}
|
||||||
id={`${slugWithModifier}-${i}`}
|
value={val}
|
||||||
value={val}
|
disabled={!editableEntries || isDisabled}
|
||||||
disabled={!editableEntries || isDisabled}
|
onChange={(_key, val) => edit(i, val)}
|
||||||
onChange={(_key, val) => edit(i, val)}
|
|
||||||
|
|
||||||
maxLength={props.maxLength}
|
maxLength={props.maxLength}
|
||||||
isUrl={props.isUrl}
|
isUrl={props.isUrl}
|
||||||
valueTransform={props.valueTransform}
|
valueTransform={props.valueTransform}
|
||||||
|
|
||||||
autofill={props.autofill}
|
autofill={props.autofill}
|
||||||
showAllOptionsOnEmpty={props.showAllOptionsOnEmpty}
|
showAllOptionsOnEmpty={props.showAllOptionsOnEmpty}
|
||||||
/>
|
/>
|
||||||
{
|
{
|
||||||
!isDisabled &&
|
!isDisabled &&
|
||||||
<div className="input-group-append">
|
<div className="input-group-append">
|
||||||
<button type="button" onClick={() => remove(i)}
|
<button type="button" onClick={() => remove(i)}
|
||||||
title="Remove"
|
title="Remove"
|
||||||
data-index={i} className="btn btn-outline-dark data-entry-list-button"><CloseIcon /></button>
|
data-index={i} className="btn btn-outline-dark data-entry-list-button"><CloseIcon /></button>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
!isDisabled &&
|
!isDisabled &&
|
||||||
<li className="input-group">
|
<li className="input-group">
|
||||||
<DataEntryInput
|
<DataEntryInput
|
||||||
slug={props.slug}
|
slug={props.slug}
|
||||||
name={slugWithModifier}
|
name={slugWithModifier}
|
||||||
id={slugWithModifier}
|
id={slugWithModifier}
|
||||||
value={newValue}
|
value={newValue}
|
||||||
disabled={props.disabled}
|
disabled={props.disabled}
|
||||||
required={props.required && values.length < 1}
|
required={props.required && values.length < 1}
|
||||||
onChange={(_key, val) => setNewValue(val)}
|
onChange={(_key, val) => setNewValue(val)}
|
||||||
onConfirm={(_key, val) => addNew(val)}
|
onConfirm={(_key, val) => addNew(val)}
|
||||||
|
|
||||||
maxLength={props.maxLength}
|
maxLength={props.maxLength}
|
||||||
placeholder={props.placeholder}
|
placeholder={props.placeholder}
|
||||||
isUrl={props.isUrl}
|
isUrl={props.isUrl}
|
||||||
valueTransform={props.valueTransform}
|
valueTransform={props.valueTransform}
|
||||||
confirmOnEnter={confirmOnEnter}
|
confirmOnEnter={confirmOnEnter}
|
||||||
|
|
||||||
autofill={props.autofill}
|
autofill={props.autofill}
|
||||||
showAllOptionsOnEmpty={props.showAllOptionsOnEmpty}
|
showAllOptionsOnEmpty={props.showAllOptionsOnEmpty}
|
||||||
confirmOnAutofillSelect={true}
|
confirmOnAutofillSelect={true}
|
||||||
/>
|
/>
|
||||||
{
|
{
|
||||||
newValue != undefined &&
|
newValue != undefined &&
|
||||||
<>
|
<>
|
||||||
<div className="input-group-append">
|
<div className="input-group-append">
|
||||||
<button type="button"
|
<button type="button"
|
||||||
className="btn btn-primary data-entry-list-button"
|
className="btn btn-primary data-entry-list-button"
|
||||||
title="Confirm new value"
|
title="Confirm new value"
|
||||||
onClick={() => addNew()}
|
onClick={() => addNew()}
|
||||||
><SaveIcon /></button>
|
><SaveIcon /></button>
|
||||||
</div>
|
</div>
|
||||||
<div className="input-group-append">
|
<div className="input-group-append">
|
||||||
<button type="button" onClick={() => clearNew()}
|
<button type="button" onClick={() => clearNew()}
|
||||||
title="Clear new value"
|
title="Clear new value"
|
||||||
className="btn btn-warning data-entry-list-button"><CloseIcon /></button>
|
className="btn btn-warning data-entry-list-button"><CloseIcon /></button>
|
||||||
</div>
|
</div>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,11 +12,20 @@ interface PatternDataEntryProps extends BaseDataEntryProps {
|
|||||||
*/
|
*/
|
||||||
pattern: string;
|
pattern: string;
|
||||||
maxLength?: number;
|
maxLength?: number;
|
||||||
|
valueTransform?: (val: string) => string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PatternDataEntry: React.FC<PatternDataEntryProps> = props => {
|
export const PatternDataEntry: React.FC<PatternDataEntryProps> = props => {
|
||||||
const handleChange = (value: string) => {
|
const handleChange = (value: string) => {
|
||||||
props.onChange?.(props.slug, value);
|
props.onChange?.(props.slug, transformValue(value));
|
||||||
|
};
|
||||||
|
|
||||||
|
const transformValue = (value: string) => {
|
||||||
|
const transform = props.valueTransform || (x => x);
|
||||||
|
const transformedValue = value === '' ?
|
||||||
|
null :
|
||||||
|
transform(value);
|
||||||
|
return transformedValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -54,383 +54,6 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.building.date_source == "Expert knowledge of building" ||
|
|
||||||
props.building.date_source == "Expert estimate from image" ||
|
|
||||||
props.building.date_source == null
|
|
||||||
){
|
|
||||||
return (
|
|
||||||
<Fragment>
|
|
||||||
<DataEntryGroup name="Building age">
|
|
||||||
<YearDataEntry
|
|
||||||
year={props.building.date_year}
|
|
||||||
upper={props.building.date_upper}
|
|
||||||
lower={props.building.date_lower}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
|
|
||||||
allow_verify={props.user !== undefined && props.building.date_year !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("date_year")}
|
|
||||||
user_verified_as={props.user_verified.date_year}
|
|
||||||
verified_count={props.building.verified.date_year}
|
|
||||||
|
|
||||||
allow_verify_upper={props.user !== undefined && props.building.date_upper !== null && !props.edited}
|
|
||||||
onVerify_upper={props.onVerify}
|
|
||||||
user_verified_upper={props.user_verified.hasOwnProperty("date_upper")}
|
|
||||||
user_verified_as_upper={props.user_verified.date_upper}
|
|
||||||
verified_count_upper={props.building.verified.date_upper}
|
|
||||||
|
|
||||||
allow_verify_lower={props.user !== undefined && props.building.date_lower !== null && !props.edited}
|
|
||||||
onVerify_lower={props.onVerify}
|
|
||||||
user_verified_lower={props.user_verified.hasOwnProperty("date_lower")}
|
|
||||||
user_verified_as_lower={props.user_verified.date_lower}
|
|
||||||
verified_count_lower={props.building.verified.date_lower}
|
|
||||||
/>
|
|
||||||
<NumericDataEntry
|
|
||||||
title={dataFields.facade_year.title}
|
|
||||||
slug="facade_year"
|
|
||||||
value={props.building.facade_year}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={1}
|
|
||||||
min={1}
|
|
||||||
max={currentYear}
|
|
||||||
tooltip={dataFields.facade_year.tooltip}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="facade_year"
|
|
||||||
allow_verify={props.user !== undefined && props.building.facade_year !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("facade_year")}
|
|
||||||
user_verified_as={props.user_verified.facade_year}
|
|
||||||
verified_count={props.building.verified.facade_year}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.date_source.title}
|
|
||||||
slug="date_source"
|
|
||||||
value={props.building.date_source}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.date_source.tooltip}
|
|
||||||
placeholder={dataFields.date_source.example}
|
|
||||||
options={dataFields.date_source.items}
|
|
||||||
/>
|
|
||||||
{(props.building.date_source == dataFields.date_source.items[0] ||
|
|
||||||
props.building.date_source == dataFields.date_source.items[1] ||
|
|
||||||
props.building.date_source == null) ? <></> :
|
|
||||||
<>
|
|
||||||
<MultiDataEntry
|
|
||||||
title={dataFields.date_link.title}
|
|
||||||
slug="date_link"
|
|
||||||
value={props.building.date_link}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.date_link.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Cladding, extensions and retrofits">
|
|
||||||
<NumericDataEntry
|
|
||||||
slug='age_cladding_date'
|
|
||||||
title={dataFields.age_cladding_date.title}
|
|
||||||
value={props.building.age_cladding_date}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={1}
|
|
||||||
min={1}
|
|
||||||
max={currentYear}
|
|
||||||
tooltip={dataFields.extension_year.tooltip}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="age_cladding_date"
|
|
||||||
allow_verify={props.user !== undefined && props.building.age_cladding_date !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("age_cladding_date")}
|
|
||||||
user_verified_as={props.user_verified.age_cladding_date}
|
|
||||||
verified_count={props.building.verified.age_cladding_date}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.age_cladding_date_source_type.title}
|
|
||||||
slug="age_cladding_date_source_type"
|
|
||||||
value={props.building.age_cladding_date_source_type}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.age_cladding_date_source_type.tooltip}
|
|
||||||
options={dataFields.age_cladding_date_source_type.items}
|
|
||||||
placeholder={dataFields.age_cladding_date_source_type.example}
|
|
||||||
/>
|
|
||||||
{(props.building.age_cladding_date_source_type == dataFields.age_cladding_date_source_type.items[0] ||
|
|
||||||
props.building.age_cladding_date_source_type == dataFields.age_cladding_date_source_type.items[1] ||
|
|
||||||
props.building.age_cladding_date_source_type == null) ? <></> :
|
|
||||||
<>
|
|
||||||
<MultiDataEntry
|
|
||||||
title={dataFields.age_cladding_date_source_links.title}
|
|
||||||
slug="age_cladding_date_source_links"
|
|
||||||
value={props.building.age_cladding_date_source_links}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.age_cladding_date_source_links.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
<hr/>
|
|
||||||
<NumericDataEntry
|
|
||||||
slug='age_extension_date'
|
|
||||||
title={dataFields.age_extension_date.title}
|
|
||||||
value={props.building.age_extension_date}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={1}
|
|
||||||
min={1}
|
|
||||||
max={currentYear}
|
|
||||||
tooltip={dataFields.extension_year.tooltip}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="age_extension_date"
|
|
||||||
allow_verify={props.user !== undefined && props.building.age_extension_date !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("age_extension_date")}
|
|
||||||
user_verified_as={props.user_verified.age_extension_date}
|
|
||||||
verified_count={props.building.verified.age_extension_date}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.age_extension_date_source_type.title}
|
|
||||||
slug="age_extension_date_source_type"
|
|
||||||
value={props.building.age_extension_date_source_type}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.age_extension_date_source_type.tooltip}
|
|
||||||
options={dataFields.age_extension_date_source_type.items}
|
|
||||||
placeholder={dataFields.age_extension_date_source_type.example}
|
|
||||||
/>
|
|
||||||
{(props.building.age_extension_date_source_type == dataFields.age_extension_date_source_type.items[0] ||
|
|
||||||
props.building.age_extension_date_source_type == dataFields.age_extension_date_source_type.items[1] ||
|
|
||||||
props.building.age_extension_date_source_type == null) ? <></> :
|
|
||||||
<>
|
|
||||||
<MultiDataEntry
|
|
||||||
title={dataFields.age_extension_date_source_links.title}
|
|
||||||
slug="age_extension_date_source_links"
|
|
||||||
value={props.building.age_extension_date_source_links}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.age_extension_date_source_links.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
<hr/>
|
|
||||||
<NumericDataEntry
|
|
||||||
slug='age_retrofit_date'
|
|
||||||
title={dataFields.age_retrofit_date.title}
|
|
||||||
value={props.building.age_retrofit_date}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={1}
|
|
||||||
min={1}
|
|
||||||
max={currentYear}
|
|
||||||
tooltip={dataFields.extension_year.tooltip}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="age_retrofit_date"
|
|
||||||
allow_verify={props.user !== undefined && props.building.age_retrofit_date !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("age_retrofit_date")}
|
|
||||||
user_verified_as={props.user_verified.age_retrofit_date}
|
|
||||||
verified_count={props.building.verified.age_retrofit_date}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.age_retrofit_date_source_type.title}
|
|
||||||
slug="age_retrofit_date_source_type"
|
|
||||||
value={props.building.age_retrofit_date_source_type}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.age_retrofit_date_source_type.tooltip}
|
|
||||||
options={dataFields.age_retrofit_date_source_type.items}
|
|
||||||
placeholder={dataFields.age_retrofit_date_source_type.example}
|
|
||||||
/>
|
|
||||||
{(props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[0] ||
|
|
||||||
props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[1] ||
|
|
||||||
props.building.age_retrofit_date_source_type == null) ? <></> :
|
|
||||||
<>
|
|
||||||
<MultiDataEntry
|
|
||||||
title={dataFields.age_retrofit_date_source_links.title}
|
|
||||||
slug="age_retrofit_date_source_links"
|
|
||||||
value={props.building.age_retrofit_date_source_links}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.age_retrofit_date_source_links.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Lifespan and site history">
|
|
||||||
<button className={`map-switcher-inline ${props.mapColourScale == "survival_status" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToSurvivalMapStyle}>
|
|
||||||
{(props.mapColourScale == "is_domestic")? 'Click here to hide historical maps':'Click here to show historical maps'}
|
|
||||||
</button>
|
|
||||||
<DataEntryGroup name="Constructions and demolitions on this site" showCount={false}>
|
|
||||||
<DynamicsBuildingPane>
|
|
||||||
<label>Current building (age data <Link to={ageLinkUrl}>editable here</Link>)</label>
|
|
||||||
<FieldRow>
|
|
||||||
<div>
|
|
||||||
<NumericDataEntry
|
|
||||||
slug=''
|
|
||||||
title={dataFields.demolished_buildings.items.year_constructed.title}
|
|
||||||
value={currentBuildingConstructionYear}
|
|
||||||
disabled={true}
|
|
||||||
mode='view'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<NumericDataEntry
|
|
||||||
slug=''
|
|
||||||
title={dataFields.demolished_buildings.items.year_demolished.title}
|
|
||||||
value={undefined}
|
|
||||||
placeholder='---'
|
|
||||||
disabled={true}
|
|
||||||
mode='view'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div style={{flex: '0 1 27%'}}>
|
|
||||||
<DataEntry
|
|
||||||
slug=''
|
|
||||||
title='Lifespan to date'
|
|
||||||
value={ (thisYear - currentBuildingConstructionYear) + ''}
|
|
||||||
disabled={true}
|
|
||||||
mode='view'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</FieldRow>
|
|
||||||
</DynamicsBuildingPane>
|
|
||||||
{
|
|
||||||
currentBuildingConstructionYear == undefined ?
|
|
||||||
<InfoBox>To add historical records, fill in the <Link to={ageLinkUrl}>Age</Link> data first.</InfoBox> :
|
|
||||||
|
|
||||||
<>
|
|
||||||
<LogicalDataEntry
|
|
||||||
slug='dynamics_has_demolished_buildings'
|
|
||||||
title={dataFields.dynamics_has_demolished_buildings.title}
|
|
||||||
value={building.dynamics_has_demolished_buildings}
|
|
||||||
disallowFalse={(building.demolished_buildings?.length ?? 0) > 0}
|
|
||||||
disallowNull={(building.demolished_buildings?.length ?? 0) > 0}
|
|
||||||
|
|
||||||
onChange={props.onSaveChange}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
/>
|
|
||||||
{
|
|
||||||
building.dynamics_has_demolished_buildings &&
|
|
||||||
<>
|
|
||||||
<DynamicsDataEntry
|
|
||||||
|
|
||||||
/*
|
|
||||||
Will clear the edits and new record data upon navigating to another building.
|
|
||||||
Should get a better way to do this, plus a way to actually keep unsaved edits.
|
|
||||||
*/
|
|
||||||
key={building.building_id}
|
|
||||||
|
|
||||||
value={building.demolished_buildings}
|
|
||||||
editableEntries={true}
|
|
||||||
slug='demolished_buildings'
|
|
||||||
title={dataFields.demolished_buildings.title}
|
|
||||||
mode={props.mode}
|
|
||||||
onChange={props.onChange}
|
|
||||||
onSaveAdd={props.onSaveAdd}
|
|
||||||
hasEdits={props.edited}
|
|
||||||
maxYear={currentBuildingConstructionYear}
|
|
||||||
minYear={50}
|
|
||||||
/>
|
|
||||||
{
|
|
||||||
props.mode === 'view' &&
|
|
||||||
<InfoBox>Switch to edit mode to add/edit past building records</InfoBox>
|
|
||||||
}
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
<InfoBox type='warning'>
|
|
||||||
This section is under development in collaboration with the historic environment sector.
|
|
||||||
Please let us know your suggestions on the <a href="https://discuss.colouring.london/t/dynamics-category-discussion/107">discussion forum</a>! (external link - save your edits first)
|
|
||||||
</InfoBox>
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Survival and loss tracked using historical maps" collapsed={true} >
|
|
||||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
|
||||||
<i>
|
|
||||||
Can you help us create a map that shows how many buildings in London have survived since the 1890s?
|
|
||||||
Choose a colour to indicate whether the building has survived.
|
|
||||||
</i>
|
|
||||||
</div>
|
|
||||||
<button className={`map-switcher-inline ${props.mapColourScale == "survival_status" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToSurvivalMapStyle}>
|
|
||||||
{(props.mapColourScale == "is_domestic")? 'Click here to hide historical maps':'Click here to show historical maps'}
|
|
||||||
</button>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.survival_status.title}
|
|
||||||
slug="survival_status"
|
|
||||||
value={props.building.survival_status}
|
|
||||||
tooltip={dataFields.survival_status.tooltip}
|
|
||||||
options={SurvivalStatusOptions}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.survival_source.title}
|
|
||||||
slug="survival_source"
|
|
||||||
value={props.building.survival_source}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.survival_source.tooltip}
|
|
||||||
placeholder={dataFields.survival_source.example}
|
|
||||||
options={dataFields.survival_source.items}
|
|
||||||
/>
|
|
||||||
{(props.building.survival_source == dataFields.survival_source_links[0] ||
|
|
||||||
props.building.survival_source == dataFields.survival_source_links[1] ||
|
|
||||||
props.building.survival_source == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.survival_source_links.title}
|
|
||||||
slug="survival_source_links"
|
|
||||||
value={props.building.survival_source_links}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.survival_source_links.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
</Fragment>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DataEntryGroup name="Building age">
|
<DataEntryGroup name="Building age">
|
||||||
@ -509,6 +132,13 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
<DataEntry
|
||||||
|
title="Year of completion (best estimate)"
|
||||||
|
slug=""
|
||||||
|
value=""
|
||||||
|
mode='view'
|
||||||
|
tooltip='Coming Soon'
|
||||||
|
/>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Cladding, extensions and retrofits">
|
<DataEntryGroup name="Cladding, extensions and retrofits">
|
||||||
<NumericDataEntry
|
<NumericDataEntry
|
||||||
@ -751,7 +381,7 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
Please let us know your suggestions on the <a href="https://discuss.colouring.london/t/dynamics-category-discussion/107">discussion forum</a>! (external link - save your edits first)
|
Please let us know your suggestions on the <a href="https://discuss.colouring.london/t/dynamics-category-discussion/107">discussion forum</a>! (external link - save your edits first)
|
||||||
</InfoBox>
|
</InfoBox>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Survival and loss tracked using historical maps" collapsed={true} >
|
<DataEntryGroup name="Survival tracking" collapsed={true} >
|
||||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||||
<i>
|
<i>
|
||||||
Can you help us create a map that shows how many buildings in London have survived since the 1890s?
|
Can you help us create a map that shows how many buildings in London have survived since the 1890s?
|
||||||
@ -800,6 +430,40 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Historical map data options" collapsed={true} >
|
||||||
|
<InfoBox type='warning'>
|
||||||
|
This section is under development
|
||||||
|
</InfoBox>
|
||||||
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||||
|
<i>
|
||||||
|
This section provides links to open digitised historical maps/mapping data that we are using in the Colouring Cities platform.
|
||||||
|
</i>
|
||||||
|
</div>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.age_historical_raster_map_links.title}
|
||||||
|
slug="age_historical_raster_map_links"
|
||||||
|
value={props.building.age_historical_raster_map_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.age_historical_raster_map_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.age_historical_vectorised_footprint_links.title}
|
||||||
|
slug="age_historical_vectorised_footprint_links"
|
||||||
|
value={props.building.age_historical_vectorised_footprint_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.age_historical_vectorised_footprint_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</DataEntryGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React from 'react';
|
import React, { Fragment } from 'react';
|
||||||
|
|
||||||
import '../../map/map-button.css';
|
import '../../map/map-button.css';
|
||||||
import withCopyEdit from '../data-container';
|
import withCopyEdit from '../data-container';
|
||||||
@ -15,6 +15,7 @@ import SelectDataEntry from '../data-components/select-data-entry';
|
|||||||
import Verification from '../data-components/verification';
|
import Verification from '../data-components/verification';
|
||||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||||
import { useDisplayPreferences } from '../../displayPreferences-context';
|
import { useDisplayPreferences } from '../../displayPreferences-context';
|
||||||
|
import DataEntry from '../data-components/data-entry';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Community view/edit section
|
* Community view/edit section
|
||||||
@ -38,192 +39,199 @@ const CommunityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
}
|
}
|
||||||
const { darkLightTheme } = useDisplayPreferences();
|
const { darkLightTheme } = useDisplayPreferences();
|
||||||
const worthKeepingReasonsNonEmpty = Object.values(props.building.community_type_worth_keeping_reasons ?? {}).some(x => x);
|
const worthKeepingReasonsNonEmpty = Object.values(props.building.community_type_worth_keeping_reasons ?? {}).some(x => x);
|
||||||
return <>
|
return (
|
||||||
<DataEntryGroup name="Community views on building types">
|
<Fragment>
|
||||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
<DataEntryGroup name="Community views on how well buildings work">
|
||||||
<i>
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||||
Note: We are currently only collecting data on non-residential buildings.
|
<i>
|
||||||
</i>
|
Note: We are currently only collecting data on non-residential buildings.
|
||||||
</div>
|
</i>
|
||||||
<div className='community-opinion-pane'>
|
</div>
|
||||||
{(props.building.is_domestic === "no" || props.building.is_domestic === "mixed domestic/non-domestic") ?
|
<div className='community-opinion-pane'>
|
||||||
<>
|
{(props.building.is_domestic === "no" || props.building.is_domestic === "mixed domestic/non-domestic") ?
|
||||||
<UserOpinionEntry
|
<>
|
||||||
slug='community_like'
|
<UserOpinionEntry
|
||||||
title={buildingUserFields.community_like.title}
|
slug='community_like'
|
||||||
|
title={buildingUserFields.community_like.title}
|
||||||
|
|
||||||
userValue={props.building.community_like}
|
userValue={props.building.community_like}
|
||||||
|
|
||||||
|
onChange={props.onSaveChange}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
:
|
||||||
|
<></>
|
||||||
|
}
|
||||||
|
<LogicalDataEntryYesOnlyWithExplanation
|
||||||
|
slug='community_type_worth_keeping'
|
||||||
|
title={buildingUserFields.community_type_worth_keeping.title}
|
||||||
|
|
||||||
|
value={props.building.community_type_worth_keeping}
|
||||||
|
disallowFalse={worthKeepingReasonsNonEmpty}
|
||||||
|
disallowNull={worthKeepingReasonsNonEmpty}
|
||||||
|
|
||||||
|
onChange={props.onSaveChange}
|
||||||
|
mode={props.mode}
|
||||||
|
|
||||||
|
/>
|
||||||
|
{(props.mapColourScale == "typology_likes") ?
|
||||||
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
||||||
|
{'Click here to change map to buildings of local interest.'}
|
||||||
|
</button>
|
||||||
|
:
|
||||||
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
|
{"Click to return to liked typologies mapped."}
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
{
|
||||||
|
props.building.community_type_worth_keeping === true &&
|
||||||
|
<MultiSelectDataEntry
|
||||||
|
slug='community_type_worth_keeping_reasons'
|
||||||
|
title={buildingUserFields.community_type_worth_keeping_reasons.title}
|
||||||
|
value={props.building.community_type_worth_keeping_reasons}
|
||||||
|
disabled={!props.building.community_type_worth_keeping}
|
||||||
|
onChange={props.onSaveChange}
|
||||||
|
options={
|
||||||
|
Object.entries(buildingUserFields.community_type_worth_keeping_reasons.fields)
|
||||||
|
.map(([key, definition]) => ({
|
||||||
|
key,
|
||||||
|
label: definition.title
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
mode={props.mode}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
<hr />
|
||||||
|
<UserOpinionEntry
|
||||||
|
slug='community_local_significance'
|
||||||
|
title={buildingUserFields.community_local_significance.title}
|
||||||
|
|
||||||
|
userValue={props.building.community_local_significance}
|
||||||
|
|
||||||
onChange={props.onSaveChange}
|
onChange={props.onSaveChange}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
</>
|
{(props.mapColourScale == "community_local_significance_total") ?
|
||||||
:
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
<></>
|
{'Click to return to liked typologies mapped.'}
|
||||||
}
|
</button>
|
||||||
<LogicalDataEntryYesOnlyWithExplanation
|
:
|
||||||
slug='community_type_worth_keeping'
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
||||||
title={buildingUserFields.community_type_worth_keeping.title}
|
{"Click here to change map to buildings of local interest."}
|
||||||
|
</button>
|
||||||
value={props.building.community_type_worth_keeping}
|
}
|
||||||
disallowFalse={worthKeepingReasonsNonEmpty}
|
<hr />
|
||||||
disallowNull={worthKeepingReasonsNonEmpty}
|
<UserOpinionEntry
|
||||||
|
slug='community_expected_planning_application'
|
||||||
onChange={props.onSaveChange}
|
title={buildingUserFields.community_expected_planning_application.title}
|
||||||
mode={props.mode}
|
|
||||||
|
|
||||||
/>
|
|
||||||
{(props.mapColourScale == "typology_likes") ?
|
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
|
||||||
{'Click here to change map to buildings of local interest.'}
|
|
||||||
</button>
|
|
||||||
:
|
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
|
||||||
{"Click to return to liked typologies mapped."}
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
{
|
|
||||||
props.building.community_type_worth_keeping === true &&
|
|
||||||
<MultiSelectDataEntry
|
|
||||||
slug='community_type_worth_keeping_reasons'
|
|
||||||
title={buildingUserFields.community_type_worth_keeping_reasons.title}
|
|
||||||
value={props.building.community_type_worth_keeping_reasons}
|
|
||||||
disabled={!props.building.community_type_worth_keeping}
|
|
||||||
onChange={props.onSaveChange}
|
|
||||||
options={
|
|
||||||
Object.entries(buildingUserFields.community_type_worth_keeping_reasons.fields)
|
|
||||||
.map(([key, definition]) => ({
|
|
||||||
key,
|
|
||||||
label: definition.title
|
|
||||||
}))
|
|
||||||
}
|
|
||||||
|
|
||||||
|
userValue={props.building.community_expected_planning_application}
|
||||||
|
|
||||||
|
onChange={props.onSaveChange}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
}
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||||
<hr />
|
<i>
|
||||||
<UserOpinionEntry
|
For more information on current planning applications, refer to the Planning Controls category.
|
||||||
slug='community_local_significance'
|
</i>
|
||||||
title={buildingUserFields.community_local_significance.title}
|
</div>
|
||||||
|
{(props.mapColourScale == "community_expected_planning_application_total") ?
|
||||||
userValue={props.building.community_local_significance}
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
|
{'Click to return to liked typologies mapped.'}
|
||||||
onChange={props.onSaveChange}
|
</button>
|
||||||
|
:
|
||||||
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
||||||
|
{"Click here to change map to planning applications expected by community."}
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
</div>
|
||||||
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Buildings in community use">
|
||||||
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||||
|
<i>
|
||||||
|
Here we are collecting information on the location of buildings used for community activities so we can track loss of/additions to community space over time.
|
||||||
|
</i>
|
||||||
|
</div>
|
||||||
|
<LogicalDataEntry
|
||||||
|
slug='community_activities_current'
|
||||||
|
title={dataFields.community_activities_current.title}
|
||||||
|
tooltip={dataFields.community_activities_current.tooltip}
|
||||||
|
value={props.building.community_activities_current}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
mode={props.mode}
|
||||||
|
/>
|
||||||
|
<LogicalDataEntry
|
||||||
|
slug='community_activities'
|
||||||
|
title={dataFields.community_activities.title}
|
||||||
|
tooltip={dataFields.community_activities.tooltip}
|
||||||
|
value={props.building.community_activities}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
mode={props.mode}
|
||||||
|
/>
|
||||||
|
<LogicalDataEntry
|
||||||
|
slug='community_activities_always'
|
||||||
|
title={dataFields.community_activities_always.title}
|
||||||
|
tooltip={dataFields.community_activities_always.tooltip}
|
||||||
|
value={props.building.community_activities_always}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
mode={props.mode}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
slug='community_public_ownership'
|
||||||
|
title={dataFields.community_public_ownership.title}
|
||||||
|
value={props.building.community_public_ownership}
|
||||||
|
options={dataFields.community_public_ownership.items}
|
||||||
|
onChange={props.onChange}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
/>
|
/>
|
||||||
{(props.mapColourScale == "community_local_significance_total") ?
|
<Verification
|
||||||
|
slug="community_public_ownership"
|
||||||
|
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
||||||
|
user_verified_as={props.user_verified.community_public_ownership}
|
||||||
|
verified_count={props.building.verified.community_public_ownership}
|
||||||
|
/>
|
||||||
|
<MultiDataEntry
|
||||||
|
slug='community_public_ownership_sources'
|
||||||
|
title={dataFields.community_public_ownership_sources.title}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder={'https://...'}
|
||||||
|
editableEntries={true}
|
||||||
|
value={props.building.community_public_ownership_sources}
|
||||||
|
onChange={props.onChange}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="community_public_ownership_sources"
|
||||||
|
allow_verify={props.user !== undefined && props.building.community_public_ownership_sources !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("community_public_ownership_sources")}
|
||||||
|
user_verified_as={props.user_verified.community_public_ownership_sources}
|
||||||
|
verified_count={props.building.verified.community_public_ownership_sources}
|
||||||
|
/>
|
||||||
|
{(props.mapColourScale == "community_in_public_ownership") ?
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
||||||
{'Click to return to liked typologies mapped.'}
|
{'Click to return to liked typologies mapped.'}
|
||||||
</button>
|
</button>
|
||||||
:
|
:
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToLocalSignificanceMapStyle}>
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
|
||||||
{"Click here to change map to buildings of local interest."}
|
{"Click here to see ownership type mapped."}
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
<hr />
|
</DataEntryGroup>
|
||||||
<UserOpinionEntry
|
</Fragment>
|
||||||
slug='community_expected_planning_application'
|
);
|
||||||
title={buildingUserFields.community_expected_planning_application.title}
|
|
||||||
|
|
||||||
userValue={props.building.community_expected_planning_application}
|
|
||||||
|
|
||||||
onChange={props.onSaveChange}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
/>
|
|
||||||
{(props.mapColourScale == "community_expected_planning_application_total") ?
|
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
|
||||||
{'Click to return to liked typologies mapped.'}
|
|
||||||
</button>
|
|
||||||
:
|
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
|
||||||
{"Click here to change map to planning applications expected by community."}
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Building use for community activities">
|
|
||||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
|
||||||
<i>
|
|
||||||
Here we are collecting information on the location of buildings used for community activities so we can track loss of/additions to community space over time.
|
|
||||||
</i>
|
|
||||||
</div>
|
|
||||||
<LogicalDataEntry
|
|
||||||
slug='community_activities_current'
|
|
||||||
title={dataFields.community_activities_current.title}
|
|
||||||
tooltip={dataFields.community_activities_current.tooltip}
|
|
||||||
value={props.building.community_activities_current}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
mode={props.mode}
|
|
||||||
/>
|
|
||||||
<LogicalDataEntry
|
|
||||||
slug='community_activities'
|
|
||||||
title={dataFields.community_activities.title}
|
|
||||||
tooltip={dataFields.community_activities.tooltip}
|
|
||||||
value={props.building.community_activities}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
mode={props.mode}
|
|
||||||
/>
|
|
||||||
<LogicalDataEntry
|
|
||||||
slug='community_activities_always'
|
|
||||||
title={dataFields.community_activities_always.title}
|
|
||||||
tooltip={dataFields.community_activities_always.tooltip}
|
|
||||||
value={props.building.community_activities_always}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
mode={props.mode}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
slug='community_public_ownership'
|
|
||||||
title={dataFields.community_public_ownership.title}
|
|
||||||
value={props.building.community_public_ownership}
|
|
||||||
options={dataFields.community_public_ownership.items}
|
|
||||||
onChange={props.onChange}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="community_public_ownership"
|
|
||||||
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
|
||||||
user_verified_as={props.user_verified.community_public_ownership}
|
|
||||||
verified_count={props.building.verified.community_public_ownership}
|
|
||||||
/>
|
|
||||||
<MultiDataEntry
|
|
||||||
slug='community_public_ownership_sources'
|
|
||||||
title={dataFields.community_public_ownership_sources.title}
|
|
||||||
isUrl={true}
|
|
||||||
placeholder={'https://...'}
|
|
||||||
editableEntries={true}
|
|
||||||
value={props.building.community_public_ownership_sources}
|
|
||||||
onChange={props.onChange}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="community_public_ownership_sources"
|
|
||||||
allow_verify={props.user !== undefined && props.building.community_public_ownership_sources !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership_sources")}
|
|
||||||
user_verified_as={props.user_verified.community_public_ownership_sources}
|
|
||||||
verified_count={props.building.verified.community_public_ownership_sources}
|
|
||||||
/>
|
|
||||||
{(props.mapColourScale == "community_in_public_ownership") ?
|
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToTypologyMapStyle}>
|
|
||||||
{'Click to return to liked typologies mapped.'}
|
|
||||||
</button>
|
|
||||||
:
|
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToPublicOwnershipMapStyle}>
|
|
||||||
{"Click here to see ownership type mapped."}
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
</>
|
|
||||||
};
|
};
|
||||||
const CommunityContainer = withCopyEdit(CommunityView);
|
const CommunityContainer = withCopyEdit(CommunityView);
|
||||||
|
|
||||||
|
@ -11,6 +11,7 @@ import InfoBox from '../../components/info-box';
|
|||||||
import { CategoryViewProps } from './category-view-props';
|
import { CategoryViewProps } from './category-view-props';
|
||||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||||
|
import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
|
||||||
|
|
||||||
const EnergyCategoryOptions = ["A", "B", "C", "D", "E", "F", "G"];
|
const EnergyCategoryOptions = ["A", "B", "C", "D", "E", "F", "G"];
|
||||||
const BreeamRatingOptions = [
|
const BreeamRatingOptions = [
|
||||||
@ -25,9 +26,20 @@ const BreeamRatingOptions = [
|
|||||||
* Sustainability view/edit section
|
* Sustainability view/edit section
|
||||||
*/
|
*/
|
||||||
const SustainabilityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
const SustainabilityView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||||
|
|
||||||
|
const currentYear = new Date().getFullYear();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DataEntryGroup name="Energy rating data">
|
<DataEntryGroup name="Environmental quality rating">
|
||||||
|
<DataEntry
|
||||||
|
title="Official environmental quality rating"
|
||||||
|
slug=""
|
||||||
|
value=""
|
||||||
|
mode='view'
|
||||||
|
/>
|
||||||
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Energy rating">
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.sust_breeam_rating.title}
|
title={dataFields.sust_breeam_rating.title}
|
||||||
slug="sust_breeam_rating"
|
slug="sust_breeam_rating"
|
||||||
@ -46,7 +58,6 @@ const SustainabilityView: React.FunctionComponent<CategoryViewProps> = (props) =
|
|||||||
user_verified_as={props.user_verified.sust_breeam_rating}
|
user_verified_as={props.user_verified.sust_breeam_rating}
|
||||||
verified_count={props.building.verified.sust_breeam_rating}
|
verified_count={props.building.verified.sust_breeam_rating}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.sust_dec.title}
|
title={dataFields.sust_dec.title}
|
||||||
slug="sust_dec"
|
slug="sust_dec"
|
||||||
@ -65,7 +76,6 @@ const SustainabilityView: React.FunctionComponent<CategoryViewProps> = (props) =
|
|||||||
user_verified_as={props.user_verified.sust_dec}
|
user_verified_as={props.user_verified.sust_dec}
|
||||||
verified_count={props.building.verified.sust_dec}
|
verified_count={props.building.verified.sust_dec}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.sust_aggregate_estimate_epc.title}
|
title={dataFields.sust_aggregate_estimate_epc.title}
|
||||||
slug="sust_aggregate_estimate_epc"
|
slug="sust_aggregate_estimate_epc"
|
||||||
@ -78,91 +88,160 @@ const SustainabilityView: React.FunctionComponent<CategoryViewProps> = (props) =
|
|||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
/>
|
/>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Retrofit Data">
|
<DataEntryGroup name="Retrofit history">
|
||||||
<NumericDataEntry
|
<NumericDataEntry
|
||||||
title={dataFields.sust_retrofit_date.title}
|
slug='age_retrofit_date'
|
||||||
slug="sust_retrofit_date"
|
title={dataFields.age_retrofit_date.title}
|
||||||
value={props.building.sust_retrofit_date}
|
value={props.building.age_retrofit_date}
|
||||||
tooltip={dataFields.sust_retrofit_date.tooltip}
|
|
||||||
step={1}
|
|
||||||
min={1086}
|
|
||||||
max={new Date().getFullYear()}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
/>
|
step={1}
|
||||||
|
min={1}
|
||||||
|
max={currentYear}
|
||||||
|
tooltip={dataFields.extension_year.tooltip}
|
||||||
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="sust_retrofit_date"
|
slug="age_retrofit_date"
|
||||||
allow_verify={props.user !== undefined && props.building.sust_retrofit_date !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.age_retrofit_date !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("sust_retrofit_date")}
|
user_verified={props.user_verified.hasOwnProperty("age_retrofit_date")}
|
||||||
user_verified_as={props.user_verified.sust_retrofit_date}
|
user_verified_as={props.user_verified.age_retrofit_date}
|
||||||
verified_count={props.building.verified.sust_retrofit_date}
|
verified_count={props.building.verified.age_retrofit_date}
|
||||||
/>
|
/>
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.sust_retrofit_source_type.title}
|
title={dataFields.age_retrofit_date_source_type.title}
|
||||||
slug="sust_retrofit_source_type"
|
slug="age_retrofit_date_source_type"
|
||||||
value={props.building.sust_retrofit_source_type}
|
value={props.building.age_retrofit_date_source_type}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.sust_retrofit_source_type.tooltip}
|
tooltip={dataFields.age_retrofit_date_source_type.tooltip}
|
||||||
options={dataFields.sust_retrofit_source_type.items}
|
options={dataFields.age_retrofit_date_source_type.items}
|
||||||
placeholder={dataFields.sust_retrofit_source_type.example}
|
placeholder={dataFields.age_retrofit_date_source_type.example}
|
||||||
/>
|
/>
|
||||||
{(props.building.sust_retrofit_source_type == dataFields.sust_retrofit_source_type.items[0] ||
|
{(props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[0] ||
|
||||||
props.building.sust_retrofit_source_type == dataFields.sust_retrofit_source_type.items[1] ||
|
props.building.age_retrofit_date_source_type == dataFields.age_retrofit_date_source_type.items[1] ||
|
||||||
props.building.sust_retrofit_source_type == null) ? <></> :
|
props.building.age_retrofit_date_source_type == null) ? <></> :
|
||||||
<>
|
<>
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
title={dataFields.sust_retrofit_source_links.title}
|
title={dataFields.age_retrofit_date_source_links.title}
|
||||||
slug="sust_retrofit_source_links"
|
slug="age_retrofit_date_source_links"
|
||||||
value={props.building.sust_retrofit_source_links}
|
value={props.building.age_retrofit_date_source_links}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.sust_retrofit_source_links.tooltip}
|
tooltip={dataFields.age_retrofit_date_source_links.tooltip}
|
||||||
placeholder="https://..."
|
placeholder="https://..."
|
||||||
editableEntries={true}
|
editableEntries={true}
|
||||||
isUrl={true}
|
isUrl={true}
|
||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
{/* <hr/>
|
</DataEntryGroup>
|
||||||
<DataEntry
|
<DataEntryGroup name="Solar panels">
|
||||||
title="Date of Significant Retrofits"
|
<LogicalDataEntry
|
||||||
slug=""
|
title={dataFields.energy_solar.title}
|
||||||
value=""
|
slug="energy_solar"
|
||||||
mode='view'
|
value={props.building.energy_solar}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.energy_solar.tooltip}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="date_link"
|
slug="energy_solar"
|
||||||
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.energy_solar !== null && !props.edited}
|
||||||
onVerify={props.onVerify}
|
onVerify={props.onVerify}
|
||||||
user_verified={props.user_verified.hasOwnProperty("date_link")}
|
user_verified={props.user_verified.hasOwnProperty("energy_solar")}
|
||||||
user_verified_as={props.user_verified.date_link}
|
user_verified_as={props.user_verified.energy_solar}
|
||||||
verified_count={props.building.verified.date_link}
|
verified_count={props.building.verified.energy_solar}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
{props.building.energy_solar == null ? <></> :
|
||||||
title="Source"
|
<>
|
||||||
slug=""
|
<SelectDataEntry
|
||||||
value=""
|
title={dataFields.energy_solar_source_type.title}
|
||||||
mode='view'
|
slug="energy_solar_source_type"
|
||||||
/> */}
|
value={props.building.energy_solar_source_type}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.energy_solar_source_type.tooltip}
|
||||||
|
options={dataFields.energy_solar_source_type.items}
|
||||||
|
placeholder={dataFields.energy_solar_source_type.example}
|
||||||
|
/>
|
||||||
|
{(props.building.energy_solar_source_type == dataFields.energy_solar_source_type.items[0] ||
|
||||||
|
props.building.energy_solar_source_type == dataFields.energy_solar_source_type.items[1] ||
|
||||||
|
props.building.energy_solar_source_type == null) ? <></> :
|
||||||
|
<>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.energy_solar_source_links.title}
|
||||||
|
slug="energy_solar_source_links"
|
||||||
|
value={props.building.energy_solar_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.energy_solar_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Other sustainability features">
|
<DataEntryGroup name="Green walls/roof">
|
||||||
<DataEntry
|
<LogicalDataEntry
|
||||||
title="Does the building have Solar Panels?"
|
title={dataFields.energy_green_roof.title}
|
||||||
slug=""
|
slug="energy_green_roof"
|
||||||
value=""
|
value={props.building.energy_green_roof}
|
||||||
mode='view'
|
mode={props.mode}
|
||||||
/>
|
copy={props.copy}
|
||||||
<DataEntry
|
onChange={props.onChange}
|
||||||
title="Does the building have Green Walls / Green Roof"
|
tooltip={dataFields.energy_green_roof.tooltip}
|
||||||
slug=""
|
|
||||||
value=""
|
|
||||||
mode='view'
|
|
||||||
/>
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="energy_green_roof"
|
||||||
|
allow_verify={props.user !== undefined && props.building.energy_green_roof !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("energy_green_roof")}
|
||||||
|
user_verified_as={props.user_verified.energy_green_roof}
|
||||||
|
verified_count={props.building.verified.energy_green_roof}
|
||||||
|
/>
|
||||||
|
{props.building.energy_green_roof == null ? <></> :
|
||||||
|
<>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.energy_green_roof_source_type.title}
|
||||||
|
slug="energy_green_roof_source_type"
|
||||||
|
value={props.building.energy_green_roof_source_type}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.energy_green_roof_source_type.tooltip}
|
||||||
|
options={dataFields.energy_green_roof_source_type.items}
|
||||||
|
placeholder={dataFields.energy_green_roof_source_type.example}
|
||||||
|
/>
|
||||||
|
{(props.building.energy_green_roof_source_type == dataFields.energy_green_roof_source_type.items[0] ||
|
||||||
|
props.building.energy_green_roof_source_type == dataFields.energy_green_roof_source_type.items[1] ||
|
||||||
|
props.building.energy_green_roof_source_type == null) ? <></> :
|
||||||
|
<>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.energy_green_roof_source_links.title}
|
||||||
|
slug="energy_green_roof_source_links"
|
||||||
|
value={props.building.energy_green_roof_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.energy_green_roof_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
</>
|
||||||
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
|
@ -32,14 +32,14 @@ const UseView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
const { darkLightTheme } = useDisplayPreferences();
|
const { darkLightTheme } = useDisplayPreferences();
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DataEntryGroup name="Residential/non-residential land use data (general)">
|
<DataEntryGroup name="General Land Use">
|
||||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 13, backgroundColor: "#f6f8f9" }}>
|
||||||
<i>
|
<i>
|
||||||
The vast majority of properties are residential (93% in the UK), so we have set 'residential' as the default value. Can you help us identify non-residential and mixed use buildings (and verify residential buildings too)?
|
The vast majority of properties are residential (93% in the UK), so we have set 'residential' as the default value. Can you help us identify non-residential and mixed use buildings (and verify residential buildings too)?
|
||||||
</i>
|
</i>
|
||||||
</div>
|
</div>
|
||||||
<button className={`map-switcher-inline ${props.mapColourScale == "is_domestic" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToIsDomesticMapStyle}>
|
<button className={`map-switcher-inline ${props.mapColourScale == "is_domestic" ? "enabled-state" : "disabled-state"} btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToIsDomesticMapStyle}>
|
||||||
{(props.mapColourScale == "is_domestic")? 'Showing domestic, non-domestic and mixed-use buildings (click to hide)' : 'Click to see domestic, non-domestic and mixed-use buildings on the map.'}
|
{(props.mapColourScale == "is_domestic")? 'Showing residential, non-residential and mixed-use buildings (click to hide)' : 'Click to see residential, non-residential and mixed-use buildings on the map.'}
|
||||||
</button>
|
</button>
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.is_domestic.title}
|
title={dataFields.is_domestic.title}
|
||||||
@ -87,7 +87,7 @@ const UseView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Specific land use data">
|
<DataEntryGroup name="Specific land use(s)">
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
title={dataFields.current_landuse_group.title}
|
title={dataFields.current_landuse_group.title}
|
||||||
slug="current_landuse_group"
|
slug="current_landuse_group"
|
||||||
|
@ -12,12 +12,14 @@ import SelectDataEntry from '../data-components/select-data-entry';
|
|||||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||||
|
|
||||||
const locationNumberPattern = "[1-9]\\d*[a-z]?(-([1-9]\\d*))?"; ///[1-9]\d*[a-z]?(-([1-9]\d*))?/;
|
const locationNumberPattern = "[1-9]\\d*[a-z]?(-([1-9]\\d*))?"; ///[1-9]\d*[a-z]?(-([1-9]\d*))?/;
|
||||||
|
const postcodeCharacterPattern = "^[A-Z]{1,2}[0-9]{1,2}[A-Z]?(\\s*[0-9][A-Z]{1,2})?$";
|
||||||
|
const osmIdentifierPattern = "[0-9]{1,9}";
|
||||||
|
|
||||||
const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||||
const osm_url = "https://www.openstreetmap.org/way/"+props.building.ref_osm_id;
|
const osm_url = "www.openstreetmap.org/way/"+props.building.ref_osm_id;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DataEntryGroup name="Address data">
|
<DataEntryGroup name="Addresses">
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.location_name.title}
|
title={dataFields.location_name.title}
|
||||||
slug="location_name"
|
slug="location_name"
|
||||||
@ -26,8 +28,9 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.location_name.tooltip}
|
tooltip={dataFields.location_name.tooltip}
|
||||||
placeholder="https://..."
|
placeholder=""
|
||||||
isUrl={true}
|
isUrl={false}
|
||||||
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_name"
|
slug="location_name"
|
||||||
@ -44,6 +47,23 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
mode='view'
|
mode='view'
|
||||||
tooltip="Not yet activated.<br><br>For security reasons, we do not allow the use of free text boxes and are currently looking into alternative ways to collect this data."
|
tooltip="Not yet activated.<br><br>For security reasons, we do not allow the use of free text boxes and are currently looking into alternative ways to collect this data."
|
||||||
/>
|
/>
|
||||||
|
<DataEntry
|
||||||
|
title={dataFields.location_name_link.title}
|
||||||
|
slug="location_name_link"
|
||||||
|
value={props.building.location_name_link}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.location_name_link.tooltip}
|
||||||
|
placeholder={dataFields.location_name_link.example}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
{
|
||||||
|
(props.building.location_name_link == null) ? <></> :
|
||||||
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
|
||||||
|
<i className="source-url">Source: <a href={props.building.location_name_link} target={"_blank"}>{props.building.location_name_link}</a></i>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<hr/>
|
<hr/>
|
||||||
<PatternDataEntry
|
<PatternDataEntry
|
||||||
title={dataFields.location_number.title}
|
title={dataFields.location_number.title}
|
||||||
@ -54,6 +74,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.location_number.tooltip}
|
tooltip={dataFields.location_number.tooltip}
|
||||||
|
maxLength={5}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_number"
|
slug="location_number"
|
||||||
@ -71,6 +92,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
maxLength={30}
|
maxLength={30}
|
||||||
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_street"
|
slug="location_street"
|
||||||
@ -88,6 +110,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
maxLength={30}
|
maxLength={30}
|
||||||
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_line_two"
|
slug="location_line_two"
|
||||||
@ -104,6 +127,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_town"
|
slug="location_town"
|
||||||
@ -113,15 +137,17 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
user_verified_as={props.user_verified.location_town}
|
user_verified_as={props.user_verified.location_town}
|
||||||
verified_count={props.building.verified.location_town}
|
verified_count={props.building.verified.location_town}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
<PatternDataEntry
|
||||||
title={dataFields.location_postcode.title}
|
title={dataFields.location_postcode.title}
|
||||||
slug="location_postcode"
|
slug="location_postcode"
|
||||||
value={props.building.location_postcode}
|
value={props.building.location_postcode}
|
||||||
|
pattern={postcodeCharacterPattern}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
maxLength={8}
|
maxLength={8}
|
||||||
valueTransform={x=>x.toUpperCase()}
|
valueTransform={x=>x.toUpperCase()}
|
||||||
|
tooltip={dataFields.location_postcode.tooltip}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="location_postcode"
|
slug="location_postcode"
|
||||||
@ -161,7 +187,7 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Property/footprint IDs and coordinate data">
|
<DataEntryGroup name="Property/footprint IDs and coordinates">
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.ref_toid.title}
|
title={dataFields.ref_toid.title}
|
||||||
slug="ref_toid"
|
slug="ref_toid"
|
||||||
@ -172,13 +198,27 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
disabled={true}
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
|
{
|
||||||
|
(props.building.ref_toid == null) ? <></> :
|
||||||
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
|
||||||
|
<i className="source-url">Source: <a href="https://www.ordnancesurvey.co.uk/products/os-open-toid" target={"_blank"}>{"www.ordnancesurvey.co.uk/products/os-open-toid"}</a></i>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<hr/>
|
||||||
<UPRNsDataEntry
|
<UPRNsDataEntry
|
||||||
title={dataFields.uprns.title}
|
title={dataFields.uprns.title}
|
||||||
slug="ref_uprns"
|
slug="ref_uprns"
|
||||||
value={props.building.uprns}
|
value={props.building.uprns}
|
||||||
tooltip={dataFields.uprns.tooltip}
|
tooltip={dataFields.uprns.tooltip}
|
||||||
/>
|
/>
|
||||||
<DataEntry
|
{
|
||||||
|
(props.building.uprns == null) ? <></> :
|
||||||
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
|
||||||
|
<i className="source-url">Source: <a href="https://beta.ordnancesurvey.co.uk/products/os-open-uprn" target={"_blank"}>{"beta.ordnancesurvey.co.uk/products/os-open-uprn"}</a></i>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
<hr/>
|
||||||
|
<PatternDataEntry
|
||||||
title={dataFields.ref_osm_id.title}
|
title={dataFields.ref_osm_id.title}
|
||||||
slug="ref_osm_id"
|
slug="ref_osm_id"
|
||||||
value={props.building.ref_osm_id}
|
value={props.building.ref_osm_id}
|
||||||
@ -187,13 +227,8 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
tooltip={dataFields.ref_osm_id.tooltip}
|
tooltip={dataFields.ref_osm_id.tooltip}
|
||||||
maxLength={20}
|
maxLength={20}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
pattern={osmIdentifierPattern}
|
||||||
/>
|
/>
|
||||||
{
|
|
||||||
(props.building.ref_osm_id == null) ? <></> :
|
|
||||||
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
|
|
||||||
<i className="source-url">Source: <a href={osm_url} target={"_blank"}>{osm_url}</a></i>
|
|
||||||
</div>
|
|
||||||
}
|
|
||||||
<Verification
|
<Verification
|
||||||
slug="ref_osm_id"
|
slug="ref_osm_id"
|
||||||
allow_verify={props.user !== undefined && props.building.ref_osm_id !== null && !props.edited}
|
allow_verify={props.user !== undefined && props.building.ref_osm_id !== null && !props.edited}
|
||||||
@ -202,6 +237,12 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
user_verified_as={props.user_verified.ref_osm_id}
|
user_verified_as={props.user_verified.ref_osm_id}
|
||||||
verified_count={props.building.verified.ref_osm_id}
|
verified_count={props.building.verified.ref_osm_id}
|
||||||
/>
|
/>
|
||||||
|
{
|
||||||
|
(props.building.ref_osm_id == null) ? <></> :
|
||||||
|
<div className={`alert alert-dark`} role="alert" style={{ fontSize: 14, backgroundColor: "#f6f8f9" }}>
|
||||||
|
<i className="source-url">Source: <a href={"https://"+osm_url} target={"_blank"}>{osm_url}</a></i>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
<hr/>
|
<hr/>
|
||||||
<NumericDataEntry
|
<NumericDataEntry
|
||||||
title={dataFields.location_latitude.title}
|
title={dataFields.location_latitude.title}
|
||||||
@ -274,6 +315,19 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
<hr/>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.location_alternative_footprint_links.title}
|
||||||
|
slug="location_alternative_footprint_links"
|
||||||
|
value={props.building.location_alternative_footprint_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.location_alternative_footprint_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
|
@ -19,6 +19,8 @@ import { CategoryViewProps } from './category-view-props';
|
|||||||
import { Category } from '../../config/categories-config';
|
import { Category } from '../../config/categories-config';
|
||||||
import { useDisplayPreferences } from '../../displayPreferences-context';
|
import { useDisplayPreferences } from '../../displayPreferences-context';
|
||||||
import { processParam } from '../../../api/parameters';
|
import { processParam } from '../../../api/parameters';
|
||||||
|
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||||
|
import YearDataEntry from '../data-components/year-data-entry';
|
||||||
|
|
||||||
const currentTimestamp = new Date().valueOf();
|
const currentTimestamp = new Date().valueOf();
|
||||||
const milisecondsInYear = 1000 * 60 * 60 * 24 * 365;
|
const milisecondsInYear = 1000 * 60 * 60 * 24 * 365;
|
||||||
@ -65,8 +67,8 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
const communityLinkUrl = `/${props.mode}/${Category.Community}/${props.building.building_id}`;
|
const communityLinkUrl = `/${props.mode}/${Category.Community}/${props.building.building_id}`;
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DataEntryGroup name="Planning application information" collapsed={true} >
|
<DataEntryGroup name="Current planning applications" collapsed={true} >
|
||||||
<DataEntryGroup name="Current/active applications (official data)">
|
<DataEntryGroup name="Official data">
|
||||||
<InfoBox>
|
<InfoBox>
|
||||||
This section provides data on active applications. We define these as applications with any activity in the last year.
|
This section provides data on active applications. We define these as applications with any activity in the last year.
|
||||||
<br />
|
<br />
|
||||||
@ -85,49 +87,85 @@ const PlanningView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
: <></>
|
: <></>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Past applications (official data)" collapsed={true} >
|
<DataEntryGroup name="Year of completion" collapsed={true} >
|
||||||
<InfoBox>
|
<DataEntry
|
||||||
This section provides data on past applications where available from the GLA, including those with no decision in over a year
|
title="Was the building completed?"
|
||||||
</InfoBox>
|
slug=""
|
||||||
{props.building.planning_data ?
|
value=""
|
||||||
<PlanningDataOfficialDataEntry
|
mode='view'
|
||||||
shownData={props.building.planning_data.filter(item => isArchived(item))}
|
tooltip='Coming Soon'
|
||||||
messageOnMissingData={
|
|
||||||
props.building.planning_data.length > 0 ?
|
|
||||||
"Only current application data is currently available for this site"
|
|
||||||
:
|
|
||||||
"No live planning data are currently available for this building from the Planning London Datahub."
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
: <></>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Possible future applications (crowdsourced data)" collapsed={true} >
|
|
||||||
<InfoBox type='info'>Click and colour buildings here if you think they may be subject to a future planning application involving demolition. To add your opinion on how well this building works, please also visit the <Link to={communityLinkUrl}>Community</Link> section.</InfoBox>
|
|
||||||
{
|
|
||||||
props.mapColourScale != "community_expected_planning_application_total" ?
|
|
||||||
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
|
||||||
{'Click here to view possible locations of future applications'}
|
|
||||||
</button>
|
|
||||||
:
|
|
||||||
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAllPlanningApplicationsMapStyle}>
|
|
||||||
{'Click to see planning applications'}
|
|
||||||
</button>
|
|
||||||
}
|
|
||||||
<UserOpinionEntry
|
|
||||||
slug='community_expected_planning_application'
|
|
||||||
title={buildingUserFields.community_expected_planning_application.title}
|
|
||||||
userValue={props.building.community_expected_planning_application}
|
|
||||||
|
|
||||||
onChange={props.onSaveChange}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
/>
|
/>
|
||||||
<InfoBox type='warning'>
|
<DataEntry
|
||||||
Further improvements to this feature are currently being made.
|
title="Year of completion"
|
||||||
|
slug=""
|
||||||
|
value=""
|
||||||
|
mode='view'
|
||||||
|
tooltip='Coming Soon'
|
||||||
|
/>
|
||||||
|
</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'
|
||||||
|
/>
|
||||||
|
<DataEntry
|
||||||
|
title="Link (to correct data)"
|
||||||
|
slug=""
|
||||||
|
value=""
|
||||||
|
mode='view'
|
||||||
|
tooltip='Coming Soon'
|
||||||
|
/>
|
||||||
|
<InfoBox>
|
||||||
|
If you feel there are incorrect or missing data relating to this building please contact:
|
||||||
|
planningdata@London.gov.uk
|
||||||
</InfoBox>
|
</InfoBox>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Past applications" collapsed={true} >
|
||||||
|
<InfoBox>
|
||||||
|
This section provides data on past applications where available from the GLA, including those with no decision in over a year
|
||||||
|
</InfoBox>
|
||||||
|
{props.building.planning_data ?
|
||||||
|
<PlanningDataOfficialDataEntry
|
||||||
|
shownData={props.building.planning_data.filter(item => isArchived(item))}
|
||||||
|
messageOnMissingData={
|
||||||
|
props.building.planning_data.length > 0 ?
|
||||||
|
"Only current application data is currently available for this site"
|
||||||
|
:
|
||||||
|
"No live planning data are currently available for this building from the Planning London Datahub."
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
: <></>
|
||||||
|
}
|
||||||
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Possible future applications" collapsed={true} >
|
||||||
|
<InfoBox type='info'>Click and colour buildings here if you think they may be subject to a future planning application involving demolition. To add your opinion on how well this building works, please also visit the <Link to={communityLinkUrl}>Community</Link> section.</InfoBox>
|
||||||
|
{
|
||||||
|
props.mapColourScale != "community_expected_planning_application_total" ?
|
||||||
|
<button className={`map-switcher-inline disabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToExpectedApplicationMapStyle}>
|
||||||
|
{'Click here to view possible locations of future applications'}
|
||||||
|
</button>
|
||||||
|
:
|
||||||
|
<button className={`map-switcher-inline enabled-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={switchToAllPlanningApplicationsMapStyle}>
|
||||||
|
{'Click to see planning applications'}
|
||||||
|
</button>
|
||||||
|
}
|
||||||
|
<UserOpinionEntry
|
||||||
|
slug='community_expected_planning_application'
|
||||||
|
title={buildingUserFields.community_expected_planning_application.title}
|
||||||
|
userValue={props.building.community_expected_planning_application}
|
||||||
|
|
||||||
|
onChange={props.onSaveChange}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
/>
|
||||||
|
<InfoBox type='warning'>
|
||||||
|
Further improvements to this feature are currently being made.
|
||||||
|
</InfoBox>
|
||||||
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Planning zones" collapsed={true} >
|
<DataEntryGroup name="Planning zones" collapsed={true} >
|
||||||
<InfoBox>
|
<InfoBox>
|
||||||
To view planning zone data for London click the buttons below. You may need to <u>zoom out</u>.
|
To view planning zone data for London click the buttons below. You may need to <u>zoom out</u>.
|
||||||
@ -358,6 +396,24 @@ 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}
|
||||||
/>
|
/>
|
||||||
|
<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}
|
||||||
|
/>
|
||||||
{/*
|
{/*
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_conservation_area_name.title}
|
title={dataFields.planning_conservation_area_name.title}
|
||||||
@ -394,140 +450,61 @@ 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 name="Land ownership" collapsed={true} >
|
||||||
|
<InfoBox>
|
||||||
|
This section is designed to provide information on land parcels and their ownership type. Can you help us collect this information?
|
||||||
|
</InfoBox>
|
||||||
|
<SelectDataEntry
|
||||||
|
slug='community_public_ownership'
|
||||||
|
title={dataFields.community_public_ownership.title}
|
||||||
|
value={props.building.community_public_ownership}
|
||||||
|
options={dataFields.community_public_ownership.items}
|
||||||
|
onChange={props.onChange}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="community_public_ownership"
|
||||||
|
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
||||||
|
user_verified_as={props.user_verified.community_public_ownership}
|
||||||
|
verified_count={props.building.verified.community_public_ownership}
|
||||||
|
/>
|
||||||
<DataEntry
|
<DataEntry
|
||||||
title={dataFields.planning_in_apa_url.title}
|
title="Source Type"
|
||||||
slug="planning_in_apa_url"
|
slug=""
|
||||||
value={props.building.planning_in_apa_url}
|
value=""
|
||||||
|
mode='view'
|
||||||
|
tooltip='Coming Soon'
|
||||||
|
/>
|
||||||
|
<MultiDataEntry
|
||||||
|
slug='community_public_ownership_sources'
|
||||||
|
title={dataFields.community_public_ownership_sources.title}
|
||||||
|
isUrl={true}
|
||||||
|
placeholder={'https://...'}
|
||||||
|
editableEntries={true}
|
||||||
|
value={props.building.community_public_ownership_sources}
|
||||||
|
onChange={props.onChange}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
/>
|
||||||
|
<hr/>
|
||||||
|
<DataEntry
|
||||||
|
title={dataFields.size_parcel_geometry.title}
|
||||||
|
slug="size_parcel_geometry"
|
||||||
|
value={props.building.size_parcel_geometry}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_parcel_geometry.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
isUrl={true}
|
isUrl={true}
|
||||||
placeholder="Please add relevant link here"
|
/>
|
||||||
/>
|
<button className={`map-switcher-inline ${parcel}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={parcelSwitchOnClick}>
|
||||||
<Verification
|
{(parcel === 'enabled')? 'Click to hide sample land parcel data' : 'Click to show sample land parcel data'}
|
||||||
slug="planning_in_apa_url"
|
</button>
|
||||||
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}
|
|
||||||
/>
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Forthcoming data (sections to be activated)" collapsed={true} >
|
|
||||||
<DataEntryGroup name="Active application info (crowdsourced)" collapsed={true} >
|
|
||||||
{/* will be titled "Other active application info (crowdsourced data)" once active" */}
|
|
||||||
<InfoBox type='warning'>
|
|
||||||
This category is not yet activated - Until this section is activated please report inaccuracies or problems on the <a href=" https://github.com/colouring-cities/colouring-london/discussions/categories/planning-section-comments">Discussion Forum</a>.
|
|
||||||
</InfoBox>
|
|
||||||
{/* that is placeholder display, will be replaced by actual code */}
|
|
||||||
<div className="data-title">
|
|
||||||
<div className="data-title-text">
|
|
||||||
<ul>
|
|
||||||
<li>Year of completion if known</li>
|
|
||||||
<li>If you know of a planning application that has been recently submitted for this site, and is not listed in the blue box above, please enter its planning application ID below:</li>
|
|
||||||
<li>If any of the active planning applications are not mapped onto the correct site, please tick here</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
<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}
|
|
||||||
disabled={true}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_crowdsourced_site_completion_year"
|
|
||||||
allow_verify={false}
|
|
||||||
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}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<DataEntry
|
|
||||||
title={dataFields.planning_crowdsourced_planning_id.title}
|
|
||||||
slug="planning_crowdsourced_planning_id"
|
|
||||||
value={props.building.planning_crowdsourced_planning_id}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
disabled={true}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="planning_crowdsourced_planning_id"
|
|
||||||
allow_verify={false && props.user !== undefined && props.building.planning_crowdsourced_planning_id !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("planning_crowdsourced_planning_id")}
|
|
||||||
user_verified_as={props.user_verified.planning_crowdsourced_planning_id}
|
|
||||||
verified_count={props.building.verified.planning_crowdsourced_planning_id}
|
|
||||||
/>
|
|
||||||
|
|
||||||
<LogicalDataEntry
|
|
||||||
slug='community_expected_planning_application_is_inaccurate'
|
|
||||||
title={"If any of the active planning applications are not mapped onto the correct site, please tick here"}
|
|
||||||
value={null}
|
|
||||||
|
|
||||||
onChange={props.onSaveChange}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
disabled={true}
|
|
||||||
/>
|
|
||||||
on enabling switch it to UserOpinionEntry, remove value and restore userValue
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Land ownership type" collapsed={true} >
|
|
||||||
<InfoBox type='warning'>
|
|
||||||
This category is not yet activated.
|
|
||||||
</InfoBox>
|
|
||||||
<InfoBox>
|
|
||||||
This section is designed to provide information on land parcels and their ownership type. Can you help us to crowdsource this information?
|
|
||||||
</InfoBox>
|
|
||||||
<button className={`map-switcher-inline ${parcel}-state btn btn-outline btn-outline-dark ${darkLightTheme}`} onClick={parcelSwitchOnClick}>
|
|
||||||
{(parcel === 'enabled')? 'Click to hide sample of parcel data (in City)' : 'Click to see sample of parcel data (in City) mapped'}
|
|
||||||
</button>
|
|
||||||
<div className="data-title">
|
|
||||||
<div className="data-title-text">
|
|
||||||
<ul>
|
|
||||||
<li>What type of owner owns this land parcel?</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/*
|
|
||||||
<SelectDataEntry
|
|
||||||
slug='community_public_ownership'
|
|
||||||
title={"What type of owner owns this land parcel? "}
|
|
||||||
value={props.building.community_public_ownership}
|
|
||||||
options={[
|
|
||||||
'Government-owned',
|
|
||||||
'Charity-owned',
|
|
||||||
'Community-owned/cooperative',
|
|
||||||
'Owned by other non-profit body',
|
|
||||||
'Not in public/community ownership',
|
|
||||||
]}
|
|
||||||
|
|
||||||
onChange={props.onChange}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="community_public_ownership"
|
|
||||||
allow_verify={props.user !== undefined && props.building.community_public_ownership !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("community_public_ownership")}
|
|
||||||
user_verified_as={props.user_verified.community_public_ownership}
|
|
||||||
verified_count={props.building.verified.community_public_ownership}
|
|
||||||
/>
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
)};
|
)};
|
||||||
|
@ -15,441 +15,469 @@ import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-e
|
|||||||
/**
|
/**
|
||||||
* Size view/edit section
|
* Size view/edit section
|
||||||
*/
|
*/
|
||||||
const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
const SizeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||||
<Fragment>
|
|
||||||
<DataEntryGroup name="Number of floors/storeys">
|
// Calculate the total number of floors
|
||||||
<NumericDataEntry
|
let total_floors = 0;
|
||||||
title={dataFields.size_storeys_core.title}
|
|
||||||
slug="size_storeys_core"
|
if (props.building.size_storeys_attic != null) {
|
||||||
value={props.building.size_storeys_core}
|
total_floors += props.building.size_storeys_attic;
|
||||||
mode={props.mode}
|
}
|
||||||
copy={props.copy}
|
if (props.building.size_storeys_core != null) {
|
||||||
tooltip={dataFields.size_storeys_core.tooltip}
|
total_floors += props.building.size_storeys_core;
|
||||||
onChange={props.onChange}
|
}
|
||||||
step={1}
|
if (props.building.size_storeys_basement != null) {
|
||||||
min={0}
|
total_floors += props.building.size_storeys_basement;
|
||||||
/>
|
}
|
||||||
<Verification
|
|
||||||
slug="size_storeys_core"
|
return (
|
||||||
allow_verify={props.user !== undefined && props.building.size_storeys_core !== null}
|
<Fragment>
|
||||||
onVerify={props.onVerify}
|
<DataEntryGroup name="Number of floors/storeys">
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_storeys_core")}
|
<NumericDataEntry
|
||||||
user_verified_as={props.user_verified.size_storeys_core}
|
title={dataFields.size_storeys_core.title}
|
||||||
verified_count={props.building.verified.size_storeys_core}
|
slug="size_storeys_core"
|
||||||
/>
|
value={props.building.size_storeys_core}
|
||||||
<NumericDataEntry
|
mode={props.mode}
|
||||||
title={dataFields.size_storeys_attic.title}
|
copy={props.copy}
|
||||||
slug="size_storeys_attic"
|
tooltip={dataFields.size_storeys_core.tooltip}
|
||||||
value={props.building.size_storeys_attic}
|
onChange={props.onChange}
|
||||||
mode={props.mode}
|
step={1}
|
||||||
copy={props.copy}
|
min={0}
|
||||||
tooltip={dataFields.size_storeys_attic.tooltip}
|
/>
|
||||||
onChange={props.onChange}
|
<Verification
|
||||||
step={1}
|
slug="size_storeys_core"
|
||||||
min={0}
|
allow_verify={props.user !== undefined && props.building.size_storeys_core !== null}
|
||||||
/>
|
onVerify={props.onVerify}
|
||||||
<Verification
|
user_verified={props.user_verified.hasOwnProperty("size_storeys_core")}
|
||||||
slug="size_storeys_attic"
|
user_verified_as={props.user_verified.size_storeys_core}
|
||||||
allow_verify={props.user !== undefined && props.building.size_storeys_attic !== null}
|
verified_count={props.building.verified.size_storeys_core}
|
||||||
onVerify={props.onVerify}
|
/>
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_storeys_attic")}
|
<NumericDataEntry
|
||||||
user_verified_as={props.user_verified.size_storeys_attic}
|
title={dataFields.size_storeys_attic.title}
|
||||||
verified_count={props.building.verified.size_storeys_attic}
|
slug="size_storeys_attic"
|
||||||
/>
|
value={props.building.size_storeys_attic}
|
||||||
<NumericDataEntry
|
mode={props.mode}
|
||||||
title={dataFields.size_storeys_basement.title}
|
copy={props.copy}
|
||||||
slug="size_storeys_basement"
|
tooltip={dataFields.size_storeys_attic.tooltip}
|
||||||
value={props.building.size_storeys_basement}
|
onChange={props.onChange}
|
||||||
mode={props.mode}
|
step={1}
|
||||||
copy={props.copy}
|
min={0}
|
||||||
tooltip={dataFields.size_storeys_basement.tooltip}
|
/>
|
||||||
onChange={props.onChange}
|
<Verification
|
||||||
step={1}
|
slug="size_storeys_attic"
|
||||||
min={0}
|
allow_verify={props.user !== undefined && props.building.size_storeys_attic !== null}
|
||||||
/>
|
onVerify={props.onVerify}
|
||||||
<Verification
|
user_verified={props.user_verified.hasOwnProperty("size_storeys_attic")}
|
||||||
slug="size_storeys_basement"
|
user_verified_as={props.user_verified.size_storeys_attic}
|
||||||
allow_verify={props.user !== undefined && props.building.size_storeys_basement !== null}
|
verified_count={props.building.verified.size_storeys_attic}
|
||||||
onVerify={props.onVerify}
|
/>
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_storeys_basement")}
|
<NumericDataEntry
|
||||||
user_verified_as={props.user_verified.size_storeys_basement}
|
title={dataFields.size_storeys_basement.title}
|
||||||
verified_count={props.building.verified.size_storeys_basement}
|
slug="size_storeys_basement"
|
||||||
/>
|
value={props.building.size_storeys_basement}
|
||||||
<SelectDataEntry
|
mode={props.mode}
|
||||||
title={dataFields.size_storeys_source_type.title}
|
copy={props.copy}
|
||||||
slug="size_storeys_source_type"
|
tooltip={dataFields.size_storeys_basement.tooltip}
|
||||||
value={props.building.size_storeys_source_type}
|
onChange={props.onChange}
|
||||||
options={dataFields.size_storeys_source_type.items}
|
step={1}
|
||||||
mode={props.mode}
|
min={0}
|
||||||
copy={props.copy}
|
/>
|
||||||
onChange={props.onChange}
|
<Verification
|
||||||
tooltip={dataFields.size_storeys_source_type.tooltip}
|
slug="size_storeys_basement"
|
||||||
/>
|
allow_verify={props.user !== undefined && props.building.size_storeys_basement !== null}
|
||||||
{(props.building.size_storeys_source_type == commonSourceTypes[0] ||
|
onVerify={props.onVerify}
|
||||||
props.building.size_storeys_source_type == commonSourceTypes[1] ||
|
user_verified={props.user_verified.hasOwnProperty("size_storeys_basement")}
|
||||||
props.building.size_storeys_source_type == null) ? <></> :
|
user_verified_as={props.user_verified.size_storeys_basement}
|
||||||
<><MultiDataEntry
|
verified_count={props.building.verified.size_storeys_basement}
|
||||||
title={dataFields.size_storeys_source_links.title}
|
/>
|
||||||
slug="size_storeys_source_links"
|
<NumericDataEntry
|
||||||
value={props.building.size_storeys_source_links}
|
title="Total number of floors"
|
||||||
|
slug="size_total_floors"
|
||||||
|
value={total_floors}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
tooltip="Total number of floors, calculated from other values."
|
||||||
|
onChange={props.onChange}
|
||||||
|
step={1}
|
||||||
|
min={0}
|
||||||
|
disabled={true}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.size_storeys_source_type.title}
|
||||||
|
slug="size_storeys_source_type"
|
||||||
|
value={props.building.size_storeys_source_type}
|
||||||
|
options={dataFields.size_storeys_source_type.items}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_storeys_source_links.tooltip}
|
tooltip={dataFields.size_storeys_source_type.tooltip}
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Building height data">
|
|
||||||
<NumericDataEntry
|
|
||||||
title={dataFields.size_height_apex.title}
|
|
||||||
slug="size_height_apex"
|
|
||||||
value={props.building.size_height_apex}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={0.1}
|
|
||||||
min={0}
|
|
||||||
/>
|
/>
|
||||||
<Verification
|
{(props.building.size_storeys_source_type == commonSourceTypes[0] ||
|
||||||
slug="size_height_apex"
|
props.building.size_storeys_source_type == commonSourceTypes[1] ||
|
||||||
allow_verify={props.user !== undefined && props.building.size_height_apex !== null}
|
props.building.size_storeys_source_type == null) ? <></> :
|
||||||
onVerify={props.onVerify}
|
<><MultiDataEntry
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_height_apex")}
|
title={dataFields.size_storeys_source_links.title}
|
||||||
user_verified_as={props.user_verified.size_height_apex}
|
slug="size_storeys_source_links"
|
||||||
verified_count={props.building.verified.size_height_apex}
|
value={props.building.size_storeys_source_links}
|
||||||
/>
|
mode={props.mode}
|
||||||
<SelectDataEntry
|
copy={props.copy}
|
||||||
title={dataFields.size_height_apex_source_type.title}
|
onChange={props.onChange}
|
||||||
slug="size_height_apex_source_type"
|
tooltip={dataFields.size_storeys_source_links.tooltip}
|
||||||
value={props.building.size_height_apex_source_type}
|
placeholder="https://..."
|
||||||
options={dataFields.size_height_apex_source_type.items}
|
editableEntries={true}
|
||||||
mode={props.mode}
|
isUrl={true}
|
||||||
copy={props.copy}
|
/>
|
||||||
onChange={props.onChange}
|
</>
|
||||||
tooltip={dataFields.size_height_apex_source_type.tooltip}
|
}
|
||||||
/>
|
</DataEntryGroup>
|
||||||
{(props.building.size_height_apex_source_type == commonSourceTypes[0] ||
|
<DataEntryGroup name="Height">
|
||||||
props.building.size_height_apex_source_type == commonSourceTypes[1] ||
|
<NumericDataEntry
|
||||||
props.building.size_height_apex_source_type == null) ? <></> :
|
title={dataFields.size_height_apex.title}
|
||||||
<><MultiDataEntry
|
slug="size_height_apex"
|
||||||
title={dataFields.size_height_apex_source_links.title}
|
value={props.building.size_height_apex}
|
||||||
slug="size_height_apex_source_links"
|
|
||||||
value={props.building.size_height_apex_source_links}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_height_apex_source_links.tooltip}
|
step={0.1}
|
||||||
placeholder="https://..."
|
min={0}
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
/>
|
||||||
</>
|
<Verification
|
||||||
}
|
slug="size_height_apex"
|
||||||
<hr/>
|
allow_verify={props.user !== undefined && props.building.size_height_apex !== null}
|
||||||
<NumericDataEntry
|
onVerify={props.onVerify}
|
||||||
title={dataFields.size_height_eaves.title}
|
user_verified={props.user_verified.hasOwnProperty("size_height_apex")}
|
||||||
slug="size_height_eaves"
|
user_verified_as={props.user_verified.size_height_apex}
|
||||||
value={props.building.size_height_eaves}
|
verified_count={props.building.verified.size_height_apex}
|
||||||
mode={props.mode}
|
/>
|
||||||
copy={props.copy}
|
<SelectDataEntry
|
||||||
onChange={props.onChange}
|
title={dataFields.size_height_apex_source_type.title}
|
||||||
step={0.1}
|
slug="size_height_apex_source_type"
|
||||||
min={0}
|
value={props.building.size_height_apex_source_type}
|
||||||
/>
|
options={dataFields.size_height_apex_source_type.items}
|
||||||
<Verification
|
|
||||||
slug="size_height_eaves"
|
|
||||||
allow_verify={props.user !== undefined && props.building.size_height_eaves !== null}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_height_eaves")}
|
|
||||||
user_verified_as={props.user_verified.size_height_eaves}
|
|
||||||
verified_count={props.building.verified.size_height_eaves}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.size_height_eaves_source_type.title}
|
|
||||||
slug="size_height_eaves_source_type"
|
|
||||||
value={props.building.size_height_eaves_source_type}
|
|
||||||
options={dataFields.size_height_eaves_source_type.items}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.size_height_eaves_source_type.tooltip}
|
|
||||||
/>
|
|
||||||
{(props.building.size_height_eaves_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.size_height_eaves_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.size_height_eaves_source_type == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.size_height_eaves_source_links.title}
|
|
||||||
slug="size_height_eaves_source_links"
|
|
||||||
value={props.building.size_height_eaves_source_links}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_height_eaves_source_links.tooltip}
|
tooltip={dataFields.size_height_apex_source_type.tooltip}
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
|
||||||
<DataEntryGroup name="Floor area data">
|
|
||||||
<NumericDataEntry
|
|
||||||
title={dataFields.size_floor_area_ground.title}
|
|
||||||
slug="size_floor_area_ground"
|
|
||||||
value={props.building.size_floor_area_ground}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={0.1}
|
|
||||||
min={0}
|
|
||||||
/>
|
/>
|
||||||
<Verification
|
{(props.building.size_height_apex_source_type == commonSourceTypes[0] ||
|
||||||
slug="size_floor_area_ground"
|
props.building.size_height_apex_source_type == commonSourceTypes[1] ||
|
||||||
allow_verify={props.user !== undefined && props.building.size_floor_area_ground !== null}
|
props.building.size_height_apex_source_type == null) ? <></> :
|
||||||
onVerify={props.onVerify}
|
<><MultiDataEntry
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_floor_area_ground")}
|
title={dataFields.size_height_apex_source_links.title}
|
||||||
user_verified_as={props.user_verified.size_floor_area_ground}
|
slug="size_height_apex_source_links"
|
||||||
verified_count={props.building.verified.size_floor_area_ground}
|
value={props.building.size_height_apex_source_links}
|
||||||
/>
|
mode={props.mode}
|
||||||
<NumericDataEntry
|
copy={props.copy}
|
||||||
title={dataFields.size_floor_area_total.title}
|
onChange={props.onChange}
|
||||||
slug="size_floor_area_total"
|
tooltip={dataFields.size_height_apex_source_links.tooltip}
|
||||||
value={props.building.size_floor_area_total}
|
placeholder="https://..."
|
||||||
mode={props.mode}
|
editableEntries={true}
|
||||||
copy={props.copy}
|
isUrl={true}
|
||||||
onChange={props.onChange}
|
/>
|
||||||
step={0.1}
|
</>
|
||||||
min={0}
|
}
|
||||||
/>
|
<hr/>
|
||||||
<Verification
|
<NumericDataEntry
|
||||||
slug="size_floor_area_total"
|
title={dataFields.size_height_eaves.title}
|
||||||
allow_verify={props.user !== undefined && props.building.size_floor_area_total !== null}
|
slug="size_height_eaves"
|
||||||
onVerify={props.onVerify}
|
value={props.building.size_height_eaves}
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_floor_area_total")}
|
|
||||||
user_verified_as={props.user_verified.size_floor_area_total}
|
|
||||||
verified_count={props.building.verified.size_floor_area_total}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.size_floor_area_source_type.title}
|
|
||||||
slug="size_floor_area_source_type"
|
|
||||||
value={props.building.size_floor_area_source_type}
|
|
||||||
options={dataFields.size_floor_area_source_type.items}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.size_floor_area_source_type.tooltip}
|
|
||||||
/>
|
|
||||||
{(props.building.size_floor_area_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.size_floor_area_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.size_floor_area_source_type == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.size_floor_area_source_links.title}
|
|
||||||
slug="size_floor_area_source_links"
|
|
||||||
value={props.building.size_floor_area_source_links}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_floor_area_source_links.tooltip}
|
step={0.1}
|
||||||
placeholder="https://..."
|
min={0}
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
/>
|
||||||
</>
|
<Verification
|
||||||
}
|
slug="size_height_eaves"
|
||||||
</DataEntryGroup>
|
allow_verify={props.user !== undefined && props.building.size_height_eaves !== null}
|
||||||
<DataEntryGroup name="Plot size data">
|
onVerify={props.onVerify}
|
||||||
<NumericDataEntry
|
user_verified={props.user_verified.hasOwnProperty("size_height_eaves")}
|
||||||
title={dataFields.size_width_frontage.title}
|
user_verified_as={props.user_verified.size_height_eaves}
|
||||||
slug="size_width_frontage"
|
verified_count={props.building.verified.size_height_eaves}
|
||||||
value={props.building.size_width_frontage}
|
/>
|
||||||
mode={props.mode}
|
<SelectDataEntry
|
||||||
copy={props.copy}
|
title={dataFields.size_height_eaves_source_type.title}
|
||||||
onChange={props.onChange}
|
slug="size_height_eaves_source_type"
|
||||||
step={0.1}
|
value={props.building.size_height_eaves_source_type}
|
||||||
min={0}
|
options={dataFields.size_height_eaves_source_type.items}
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="size_width_frontage"
|
|
||||||
allow_verify={props.user !== undefined && props.building.size_width_frontage !== null}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_width_frontage")}
|
|
||||||
user_verified_as={props.user_verified.size_width_frontage}
|
|
||||||
verified_count={props.building.verified.size_width_frontage}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.size_width_frontage_source_type.title}
|
|
||||||
slug="size_width_frontage_source_type"
|
|
||||||
value={props.building.size_width_frontage_source_type}
|
|
||||||
options={dataFields.size_width_frontage_source_type.items}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.size_width_frontage_source_type.tooltip}
|
|
||||||
/>
|
|
||||||
{(props.building.size_width_frontage_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.size_width_frontage_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.size_width_frontage_source_type == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.size_width_frontage_source_links.title}
|
|
||||||
slug="size_width_frontage_source_links"
|
|
||||||
value={props.building.size_width_frontage_source_links}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_width_frontage_source_links.tooltip}
|
tooltip={dataFields.size_height_eaves_source_type.tooltip}
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
<hr/>
|
|
||||||
<NumericDataEntry
|
|
||||||
title={dataFields.size_plot_area_total.title}
|
|
||||||
slug="size_plot_area_total"
|
|
||||||
tooltip={dataFields.size_plot_area_total.tooltip}
|
|
||||||
value={props.building.size_plot_area_total}
|
|
||||||
mode={props.mode}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={0.1}
|
|
||||||
min={0}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="size_plot_area_total"
|
|
||||||
allow_verify={props.user !== undefined && props.building.size_plot_area_total !== null}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_plot_area_total")}
|
|
||||||
user_verified_as={props.user_verified.size_plot_area_total}
|
|
||||||
verified_count={props.building.verified.size_plot_area_total}
|
|
||||||
/>
|
/>
|
||||||
<SelectDataEntry
|
{(props.building.size_height_eaves_source_type == commonSourceTypes[0] ||
|
||||||
title={dataFields.size_plot_area_total_source_type.title}
|
props.building.size_height_eaves_source_type == commonSourceTypes[1] ||
|
||||||
slug="size_plot_area_total_source_type"
|
props.building.size_height_eaves_source_type == null) ? <></> :
|
||||||
value={props.building.size_plot_area_total_source_type}
|
<><MultiDataEntry
|
||||||
options={dataFields.size_plot_area_total_source_type.items}
|
title={dataFields.size_height_eaves_source_links.title}
|
||||||
mode={props.mode}
|
slug="size_height_eaves_source_links"
|
||||||
copy={props.copy}
|
value={props.building.size_height_eaves_source_links}
|
||||||
onChange={props.onChange}
|
mode={props.mode}
|
||||||
tooltip={dataFields.size_plot_area_total_source_type.tooltip}
|
copy={props.copy}
|
||||||
/>
|
onChange={props.onChange}
|
||||||
{(props.building.size_plot_area_total_source_type == commonSourceTypes[0] ||
|
tooltip={dataFields.size_height_eaves_source_links.tooltip}
|
||||||
props.building.size_plot_area_total_source_type == commonSourceTypes[1] ||
|
placeholder="https://..."
|
||||||
props.building.size_far_ratio_source_type == null) ? <></> :
|
editableEntries={true}
|
||||||
<><MultiDataEntry
|
isUrl={true}
|
||||||
title={dataFields.size_plot_area_total_source_links.title}
|
/>
|
||||||
slug="size_plot_area_total_source_links"
|
</>
|
||||||
value={props.building.size_plot_area_total_source_links}
|
}
|
||||||
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Floor area">
|
||||||
|
<NumericDataEntry
|
||||||
|
title={dataFields.size_floor_area_ground.title}
|
||||||
|
slug="size_floor_area_ground"
|
||||||
|
value={props.building.size_floor_area_ground}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_plot_area_total_source_links.tooltip}
|
step={0.1}
|
||||||
placeholder="https://..."
|
min={0}
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
/>
|
||||||
</>
|
<Verification
|
||||||
}
|
slug="size_floor_area_ground"
|
||||||
<hr/>
|
allow_verify={props.user !== undefined && props.building.size_floor_area_ground !== null}
|
||||||
<NumericDataEntry
|
onVerify={props.onVerify}
|
||||||
title={dataFields.size_far_ratio.title}
|
user_verified={props.user_verified.hasOwnProperty("size_floor_area_ground")}
|
||||||
value={props.building.size_far_ratio}
|
user_verified_as={props.user_verified.size_floor_area_ground}
|
||||||
slug="size_far_ratio"
|
verified_count={props.building.verified.size_floor_area_ground}
|
||||||
tooltip={dataFields.size_far_ratio.tooltip}
|
/>
|
||||||
//placeholder={dataFields.size_far_ratio.example}
|
<NumericDataEntry
|
||||||
mode={props.mode}
|
title={dataFields.size_floor_area_total.title}
|
||||||
onChange={props.onChange}
|
slug="size_floor_area_total"
|
||||||
step={1}
|
value={props.building.size_floor_area_total}
|
||||||
min={0}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="size_far_ratio"
|
|
||||||
allow_verify={props.user !== undefined && props.building.size_far_ratio !== null}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_far_ratio")}
|
|
||||||
user_verified_as={props.user_verified.size_far_ratio}
|
|
||||||
verified_count={props.building.verified.size_far_ratio}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.size_far_ratio_source_type.title}
|
|
||||||
slug="size_far_ratio_source_type"
|
|
||||||
value={props.building.size_far_ratio_source_type}
|
|
||||||
options={dataFields.size_far_ratio_source_type.items}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.size_far_ratio_source_type.tooltip}
|
|
||||||
/>
|
|
||||||
{(props.building.size_far_ratio_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.size_far_ratio_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.size_far_ratio_source_type == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.size_far_ratio_source_links.title}
|
|
||||||
slug="size_far_ratio_source_links"
|
|
||||||
value={props.building.size_far_ratio_source_links}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_far_ratio_source_links.tooltip}
|
step={0.1}
|
||||||
placeholder="https://..."
|
min={0}
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
/>
|
||||||
</>
|
<Verification
|
||||||
}
|
slug="size_floor_area_total"
|
||||||
<hr/>
|
allow_verify={props.user !== undefined && props.building.size_floor_area_total !== null}
|
||||||
<DataEntry
|
onVerify={props.onVerify}
|
||||||
title={dataFields.size_parcel_geometry.title}
|
user_verified={props.user_verified.hasOwnProperty("size_floor_area_total")}
|
||||||
slug="size_parcel_geometry"
|
user_verified_as={props.user_verified.size_floor_area_total}
|
||||||
value={props.building.size_parcel_geometry}
|
verified_count={props.building.verified.size_floor_area_total}
|
||||||
mode={props.mode}
|
/>
|
||||||
copy={props.copy}
|
<SelectDataEntry
|
||||||
onChange={props.onChange}
|
title={dataFields.size_floor_area_source_type.title}
|
||||||
tooltip={dataFields.size_parcel_geometry.tooltip}
|
slug="size_floor_area_source_type"
|
||||||
placeholder="https://..."
|
value={props.building.size_floor_area_source_type}
|
||||||
isUrl={true}
|
options={dataFields.size_floor_area_source_type.items}
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="size_parcel_geometry"
|
|
||||||
allow_verify={props.user !== undefined && props.building.size_parcel_geometry !== null}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("size_parcel_geometry")}
|
|
||||||
user_verified_as={props.user_verified.size_parcel_geometry}
|
|
||||||
verified_count={props.building.verified.size_parcel_geometry}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.size_parcel_geometry_source_type.title}
|
|
||||||
slug="size_parcel_geometry_source_type"
|
|
||||||
value={props.building.size_parcel_geometry_source_type}
|
|
||||||
options={dataFields.size_parcel_geometry_source_type.items}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.size_parcel_geometry_source_type.tooltip}
|
|
||||||
/>
|
|
||||||
{(props.building.size_parcel_geometry_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.size_parcel_geometry_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.size_parcel_geometry_source_type == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.size_parcel_geometry_source_links.title}
|
|
||||||
slug="size_parcel_geometry_source_links"
|
|
||||||
value={props.building.size_parcel_geometry_source_links}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.size_parcel_geometry_source_links.tooltip}
|
tooltip={dataFields.size_floor_area_source_type.tooltip}
|
||||||
|
/>
|
||||||
|
{(props.building.size_floor_area_source_type == commonSourceTypes[0] ||
|
||||||
|
props.building.size_floor_area_source_type == commonSourceTypes[1] ||
|
||||||
|
props.building.size_floor_area_source_type == null) ? <></> :
|
||||||
|
<><MultiDataEntry
|
||||||
|
title={dataFields.size_floor_area_source_links.title}
|
||||||
|
slug="size_floor_area_source_links"
|
||||||
|
value={props.building.size_floor_area_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_floor_area_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
</DataEntryGroup>
|
||||||
|
<DataEntryGroup name="Plot size">
|
||||||
|
<NumericDataEntry
|
||||||
|
title={dataFields.size_width_frontage.title}
|
||||||
|
slug="size_width_frontage"
|
||||||
|
value={props.building.size_width_frontage}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
step={0.1}
|
||||||
|
min={0}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="size_width_frontage"
|
||||||
|
allow_verify={props.user !== undefined && props.building.size_width_frontage !== null}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("size_width_frontage")}
|
||||||
|
user_verified_as={props.user_verified.size_width_frontage}
|
||||||
|
verified_count={props.building.verified.size_width_frontage}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.size_width_frontage_source_type.title}
|
||||||
|
slug="size_width_frontage_source_type"
|
||||||
|
value={props.building.size_width_frontage_source_type}
|
||||||
|
options={dataFields.size_width_frontage_source_type.items}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_width_frontage_source_type.tooltip}
|
||||||
|
/>
|
||||||
|
{(props.building.size_width_frontage_source_type == commonSourceTypes[0] ||
|
||||||
|
props.building.size_width_frontage_source_type == commonSourceTypes[1] ||
|
||||||
|
props.building.size_width_frontage_source_type == null) ? <></> :
|
||||||
|
<><MultiDataEntry
|
||||||
|
title={dataFields.size_width_frontage_source_links.title}
|
||||||
|
slug="size_width_frontage_source_links"
|
||||||
|
value={props.building.size_width_frontage_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_width_frontage_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
<hr/>
|
||||||
|
<NumericDataEntry
|
||||||
|
title={dataFields.size_plot_area_total.title}
|
||||||
|
slug="size_plot_area_total"
|
||||||
|
tooltip={dataFields.size_plot_area_total.tooltip}
|
||||||
|
value={props.building.size_plot_area_total}
|
||||||
|
mode={props.mode}
|
||||||
|
onChange={props.onChange}
|
||||||
|
step={0.1}
|
||||||
|
min={0}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="size_plot_area_total"
|
||||||
|
allow_verify={props.user !== undefined && props.building.size_plot_area_total !== null}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("size_plot_area_total")}
|
||||||
|
user_verified_as={props.user_verified.size_plot_area_total}
|
||||||
|
verified_count={props.building.verified.size_plot_area_total}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.size_plot_area_total_source_type.title}
|
||||||
|
slug="size_plot_area_total_source_type"
|
||||||
|
value={props.building.size_plot_area_total_source_type}
|
||||||
|
options={dataFields.size_plot_area_total_source_type.items}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_plot_area_total_source_type.tooltip}
|
||||||
|
/>
|
||||||
|
{(props.building.size_plot_area_total_source_type == commonSourceTypes[0] ||
|
||||||
|
props.building.size_plot_area_total_source_type == commonSourceTypes[1] ||
|
||||||
|
props.building.size_far_ratio_source_type == null) ? <></> :
|
||||||
|
<><MultiDataEntry
|
||||||
|
title={dataFields.size_plot_area_total_source_links.title}
|
||||||
|
slug="size_plot_area_total_source_links"
|
||||||
|
value={props.building.size_plot_area_total_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_plot_area_total_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
<hr/>
|
||||||
|
<NumericDataEntry
|
||||||
|
title={dataFields.size_far_ratio.title}
|
||||||
|
value={props.building.size_far_ratio}
|
||||||
|
slug="size_far_ratio"
|
||||||
|
tooltip={dataFields.size_far_ratio.tooltip}
|
||||||
|
//placeholder={dataFields.size_far_ratio.example}
|
||||||
|
mode={props.mode}
|
||||||
|
onChange={props.onChange}
|
||||||
|
step={1}
|
||||||
|
min={0}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="size_far_ratio"
|
||||||
|
allow_verify={props.user !== undefined && props.building.size_far_ratio !== null}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("size_far_ratio")}
|
||||||
|
user_verified_as={props.user_verified.size_far_ratio}
|
||||||
|
verified_count={props.building.verified.size_far_ratio}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.size_far_ratio_source_type.title}
|
||||||
|
slug="size_far_ratio_source_type"
|
||||||
|
value={props.building.size_far_ratio_source_type}
|
||||||
|
options={dataFields.size_far_ratio_source_type.items}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_far_ratio_source_type.tooltip}
|
||||||
|
/>
|
||||||
|
{(props.building.size_far_ratio_source_type == commonSourceTypes[0] ||
|
||||||
|
props.building.size_far_ratio_source_type == commonSourceTypes[1] ||
|
||||||
|
props.building.size_far_ratio_source_type == null) ? <></> :
|
||||||
|
<><MultiDataEntry
|
||||||
|
title={dataFields.size_far_ratio_source_links.title}
|
||||||
|
slug="size_far_ratio_source_links"
|
||||||
|
value={props.building.size_far_ratio_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_far_ratio_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
<hr/>
|
||||||
|
<DataEntry
|
||||||
|
title={dataFields.size_parcel_geometry.title}
|
||||||
|
slug="size_parcel_geometry"
|
||||||
|
value={props.building.size_parcel_geometry}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_parcel_geometry.tooltip}
|
||||||
placeholder="https://..."
|
placeholder="https://..."
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
isUrl={true}
|
||||||
/>
|
/>
|
||||||
</>
|
<Verification
|
||||||
}
|
slug="size_parcel_geometry"
|
||||||
</DataEntryGroup>
|
allow_verify={props.user !== undefined && props.building.size_parcel_geometry !== null}
|
||||||
</Fragment>
|
onVerify={props.onVerify}
|
||||||
);
|
user_verified={props.user_verified.hasOwnProperty("size_parcel_geometry")}
|
||||||
|
user_verified_as={props.user_verified.size_parcel_geometry}
|
||||||
|
verified_count={props.building.verified.size_parcel_geometry}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.size_parcel_geometry_source_type.title}
|
||||||
|
slug="size_parcel_geometry_source_type"
|
||||||
|
value={props.building.size_parcel_geometry_source_type}
|
||||||
|
options={dataFields.size_parcel_geometry_source_type.items}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_parcel_geometry_source_type.tooltip}
|
||||||
|
/>
|
||||||
|
{(props.building.size_parcel_geometry_source_type == commonSourceTypes[0] ||
|
||||||
|
props.building.size_parcel_geometry_source_type == commonSourceTypes[1] ||
|
||||||
|
props.building.size_parcel_geometry_source_type == null) ? <></> :
|
||||||
|
<><MultiDataEntry
|
||||||
|
title={dataFields.size_parcel_geometry_source_links.title}
|
||||||
|
slug="size_parcel_geometry_source_links"
|
||||||
|
value={props.building.size_parcel_geometry_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.size_parcel_geometry_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
</DataEntryGroup>
|
||||||
|
</Fragment>
|
||||||
|
)
|
||||||
|
};
|
||||||
const SizeContainer = withCopyEdit(SizeView);
|
const SizeContainer = withCopyEdit(SizeView);
|
||||||
|
|
||||||
export default SizeContainer;
|
export default SizeContainer;
|
||||||
|
@ -1,28 +1,25 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
import InfoBox from '../../components/info-box';
|
|
||||||
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
||||||
import DataEntry from '../data-components/data-entry';
|
import DataEntry from '../data-components/data-entry';
|
||||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||||
|
|
||||||
import withCopyEdit from '../data-container';
|
import withCopyEdit from '../data-container';
|
||||||
|
|
||||||
import { CategoryViewProps } from './category-view-props';
|
import { CategoryViewProps } from './category-view-props';
|
||||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||||
import SelectDataEntry from '../data-components/select-data-entry';
|
import SelectDataEntry from '../data-components/select-data-entry';
|
||||||
import Verification from '../data-components/verification';
|
import Verification from '../data-components/verification';
|
||||||
|
import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Streetscape view/edit section
|
* Street Context view/edit section
|
||||||
*/
|
*/
|
||||||
const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
const StreetContextView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<DataEntryGroup name="Does the building have a garden?">
|
<DataEntryGroup name="Green Space">
|
||||||
<SelectDataEntry
|
<LogicalDataEntry
|
||||||
title={dataFields.context_front_garden.title}
|
title={dataFields.context_front_garden.title}
|
||||||
slug="context_front_garden"
|
slug="context_front_garden"
|
||||||
value={props.building.context_front_garden}
|
value={props.building.context_front_garden}
|
||||||
options={dataFields.context_front_garden.items}
|
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
@ -36,7 +33,7 @@ const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
user_verified_as={props.user_verified.context_front_garden}
|
user_verified_as={props.user_verified.context_front_garden}
|
||||||
verified_count={props.building.verified.context_front_garden}
|
verified_count={props.building.verified.context_front_garden}
|
||||||
/>
|
/>
|
||||||
<SelectDataEntry
|
<LogicalDataEntry
|
||||||
title={dataFields.context_back_garden.title}
|
title={dataFields.context_back_garden.title}
|
||||||
slug="context_back_garden"
|
slug="context_back_garden"
|
||||||
value={props.building.context_back_garden}
|
value={props.building.context_back_garden}
|
||||||
@ -44,8 +41,6 @@ const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.context_back_garden.tooltip}
|
tooltip={dataFields.context_back_garden.tooltip}
|
||||||
//placeholder={dataFields.context_back_garden.example}
|
|
||||||
options={dataFields.context_back_garden.items}
|
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="context_back_garden"
|
slug="context_back_garden"
|
||||||
@ -55,7 +50,7 @@ const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
user_verified_as={props.user_verified.context_back_garden}
|
user_verified_as={props.user_verified.context_back_garden}
|
||||||
verified_count={props.building.verified.context_back_garden}
|
verified_count={props.building.verified.context_back_garden}
|
||||||
/>
|
/>
|
||||||
<SelectDataEntry
|
<LogicalDataEntry
|
||||||
title={dataFields.context_flats_garden.title}
|
title={dataFields.context_flats_garden.title}
|
||||||
slug="context_flats_garden"
|
slug="context_flats_garden"
|
||||||
value={props.building.context_flats_garden}
|
value={props.building.context_flats_garden}
|
||||||
@ -63,8 +58,6 @@ const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.context_flats_garden.tooltip}
|
tooltip={dataFields.context_flats_garden.tooltip}
|
||||||
//placeholder={dataFields.context_flats_garden.example}
|
|
||||||
options={dataFields.context_flats_garden.items}
|
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="context_flats_garden"
|
slug="context_flats_garden"
|
||||||
@ -74,7 +67,6 @@ const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
user_verified_as={props.user_verified.context_flats_garden}
|
user_verified_as={props.user_verified.context_flats_garden}
|
||||||
verified_count={props.building.verified.context_flats_garden}
|
verified_count={props.building.verified.context_flats_garden}
|
||||||
/>
|
/>
|
||||||
<hr/>
|
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.context_garden_source_type.title}
|
title={dataFields.context_garden_source_type.title}
|
||||||
slug="context_garden_source_type"
|
slug="context_garden_source_type"
|
||||||
@ -104,8 +96,110 @@ const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
<hr/>
|
||||||
|
<NumericDataEntry
|
||||||
|
title={dataFields.context_green_space_distance.title}
|
||||||
|
value={props.building.context_green_space_distance}
|
||||||
|
slug="context_green_space_distance"
|
||||||
|
tooltip={dataFields.context_green_space_distance.tooltip}
|
||||||
|
//placeholder={dataFields.context_green_space_distance.example}
|
||||||
|
mode={props.mode}
|
||||||
|
onChange={props.onChange}
|
||||||
|
step={1}
|
||||||
|
min={0}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="context_green_space_distance"
|
||||||
|
allow_verify={props.user !== undefined && props.building.context_green_space_distance !== null}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("context_green_space_distance")}
|
||||||
|
user_verified_as={props.user_verified.context_green_space_distance}
|
||||||
|
verified_count={props.building.verified.context_green_space_distance}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.context_green_space_distance_source_type.title}
|
||||||
|
slug="context_green_space_distance_source_type"
|
||||||
|
value={props.building.context_green_space_distance_source_type}
|
||||||
|
options={dataFields.context_green_space_distance_source_type.items}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.context_green_space_distance_source_type.tooltip}
|
||||||
|
/>
|
||||||
|
{(props.building.context_green_space_distance_source_type == commonSourceTypes[0] ||
|
||||||
|
props.building.context_green_space_distance_source_type == commonSourceTypes[1] ||
|
||||||
|
props.building.context_green_space_distance_source_type == null) ? <></> :
|
||||||
|
<><MultiDataEntry
|
||||||
|
title={dataFields.context_green_space_distance_source_links.title}
|
||||||
|
slug="context_green_space_distance_source_links"
|
||||||
|
value={props.building.context_green_space_distance_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.context_green_space_distance_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
|
<hr/>
|
||||||
|
<NumericDataEntry
|
||||||
|
title={dataFields.context_tree_distance.title}
|
||||||
|
value={props.building.context_tree_distance}
|
||||||
|
slug="context_tree_distance"
|
||||||
|
tooltip={dataFields.context_tree_distance.tooltip}
|
||||||
|
//placeholder={dataFields.context_tree_distance.example}
|
||||||
|
mode={props.mode}
|
||||||
|
onChange={props.onChange}
|
||||||
|
step={1}
|
||||||
|
min={0}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="context_tree_distance"
|
||||||
|
allow_verify={props.user !== undefined && props.building.context_tree_distance !== null}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("context_tree_distance")}
|
||||||
|
user_verified_as={props.user_verified.context_tree_distance}
|
||||||
|
verified_count={props.building.verified.context_tree_distance}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.context_tree_distance_source_type.title}
|
||||||
|
slug="context_tree_distance_source_type"
|
||||||
|
value={props.building.context_tree_distance_source_type}
|
||||||
|
options={dataFields.context_tree_distance_source_type.items}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.context_tree_distance_source_type.tooltip}
|
||||||
|
/>
|
||||||
|
{(props.building.context_tree_distance_source_type == commonSourceTypes[0] ||
|
||||||
|
props.building.context_tree_distance_source_type == commonSourceTypes[1] ||
|
||||||
|
props.building.context_tree_distance_source_type == null) ? <></> :
|
||||||
|
<><MultiDataEntry
|
||||||
|
title={dataFields.context_tree_distance_source_links.title}
|
||||||
|
slug="context_tree_distance_source_links"
|
||||||
|
value={props.building.context_tree_distance_source_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.context_tree_distance_source_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Street/pavement properties">
|
<DataEntryGroup name="Street/pavement">
|
||||||
|
<DataEntry
|
||||||
|
title="Walkability Index"
|
||||||
|
slug=""
|
||||||
|
value=""
|
||||||
|
mode='view'
|
||||||
|
tooltip='Under development'
|
||||||
|
/>
|
||||||
|
<hr/>
|
||||||
<NumericDataEntry
|
<NumericDataEntry
|
||||||
title={dataFields.context_street_width.title}
|
title={dataFields.context_street_width.title}
|
||||||
value={props.building.context_street_width}
|
value={props.building.context_street_width}
|
||||||
@ -247,103 +341,17 @@ const StreetscapeView: React.FunctionComponent<CategoryViewProps> = (props) => (
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Access to green space">
|
<DataEntryGroup name="Number of entrances facing street">
|
||||||
<NumericDataEntry
|
<DataEntry
|
||||||
title={dataFields.context_green_space_distance.title}
|
title="Number of entrances facing street"
|
||||||
value={props.building.context_green_space_distance}
|
slug=""
|
||||||
slug="context_green_space_distance"
|
value=""
|
||||||
tooltip={dataFields.context_green_space_distance.tooltip}
|
mode='view'
|
||||||
//placeholder={dataFields.context_green_space_distance.example}
|
tooltip='Under development'
|
||||||
mode={props.mode}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={1}
|
|
||||||
min={0}
|
|
||||||
/>
|
/>
|
||||||
<Verification
|
|
||||||
slug="context_green_space_distance"
|
|
||||||
allow_verify={props.user !== undefined && props.building.context_green_space_distance !== null}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("context_green_space_distance")}
|
|
||||||
user_verified_as={props.user_verified.context_green_space_distance}
|
|
||||||
verified_count={props.building.verified.context_green_space_distance}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.context_green_space_distance_source_type.title}
|
|
||||||
slug="context_green_space_distance_source_type"
|
|
||||||
value={props.building.context_green_space_distance_source_type}
|
|
||||||
options={dataFields.context_green_space_distance_source_type.items}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.context_green_space_distance_source_type.tooltip}
|
|
||||||
/>
|
|
||||||
{(props.building.context_green_space_distance_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.context_green_space_distance_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.context_green_space_distance_source_type == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.context_green_space_distance_source_links.title}
|
|
||||||
slug="context_green_space_distance_source_links"
|
|
||||||
value={props.building.context_green_space_distance_source_links}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.context_green_space_distance_source_links.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
<hr/>
|
|
||||||
<NumericDataEntry
|
|
||||||
title={dataFields.context_tree_distance.title}
|
|
||||||
value={props.building.context_tree_distance}
|
|
||||||
slug="context_tree_distance"
|
|
||||||
tooltip={dataFields.context_tree_distance.tooltip}
|
|
||||||
//placeholder={dataFields.context_tree_distance.example}
|
|
||||||
mode={props.mode}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={1}
|
|
||||||
min={0}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="context_tree_distance"
|
|
||||||
allow_verify={props.user !== undefined && props.building.context_tree_distance !== null}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("context_tree_distance")}
|
|
||||||
user_verified_as={props.user_verified.context_tree_distance}
|
|
||||||
verified_count={props.building.verified.context_tree_distance}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.context_tree_distance_source_type.title}
|
|
||||||
slug="context_tree_distance_source_type"
|
|
||||||
value={props.building.context_tree_distance_source_type}
|
|
||||||
options={dataFields.context_tree_distance_source_type.items}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.context_tree_distance_source_type.tooltip}
|
|
||||||
/>
|
|
||||||
{(props.building.context_tree_distance_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.context_tree_distance_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.context_tree_distance_source_type == null) ? <></> :
|
|
||||||
<><MultiDataEntry
|
|
||||||
title={dataFields.context_tree_distance_source_links.title}
|
|
||||||
slug="context_tree_distance_source_links"
|
|
||||||
value={props.building.context_tree_distance_source_links}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.context_tree_distance_source_links.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
const StreetscapeContainer = withCopyEdit(StreetscapeView);
|
const StreetContextContainer = withCopyEdit(StreetContextView);
|
||||||
|
|
||||||
export default StreetscapeContainer;
|
export default StreetContextContainer;
|
||||||
|
@ -4,9 +4,9 @@ import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
|
|||||||
import SelectDataEntry from '../data-components/select-data-entry';
|
import SelectDataEntry from '../data-components/select-data-entry';
|
||||||
import NumericDataEntry from '../data-components/numeric-data-entry';
|
import NumericDataEntry from '../data-components/numeric-data-entry';
|
||||||
import Verification from '../data-components/verification';
|
import Verification from '../data-components/verification';
|
||||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
|
||||||
import { LogicalDataEntry, LogicalDataEntryYesOnly } from '../data-components/logical-data-entry/logical-data-entry';
|
import { LogicalDataEntry, LogicalDataEntryYesOnly } from '../data-components/logical-data-entry/logical-data-entry';
|
||||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||||
|
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||||
|
|
||||||
import withCopyEdit from '../data-container';
|
import withCopyEdit from '../data-container';
|
||||||
|
|
||||||
@ -21,57 +21,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
const currentBuildingConstructionYear = building.date_year || undefined;
|
const currentBuildingConstructionYear = building.date_year || undefined;
|
||||||
return (
|
return (
|
||||||
<form>
|
<form>
|
||||||
<DataEntryGroup name="Data relating to original building or extension?">
|
<DataEntryGroup name="General info">
|
||||||
<NumericDataEntry
|
|
||||||
slug='date_year'
|
|
||||||
title={dataFields.date_year.title}
|
|
||||||
value={currentBuildingConstructionYear}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
step={1}
|
|
||||||
min={1}
|
|
||||||
max={currentYear}
|
|
||||||
tooltip={dataFields.extension_year.tooltip}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="date_year"
|
|
||||||
allow_verify={props.user !== undefined && props.building.date_year !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("date_year")}
|
|
||||||
user_verified_as={props.user_verified.date_year}
|
|
||||||
verified_count={props.building.verified.date_year}
|
|
||||||
/>
|
|
||||||
<SelectDataEntry
|
|
||||||
title={dataFields.date_source.title}
|
|
||||||
slug="date_source"
|
|
||||||
value={props.building.date_source}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.date_source.tooltip}
|
|
||||||
options={dataFields.date_source.items}
|
|
||||||
placeholder={dataFields.date_source.example}
|
|
||||||
/>
|
|
||||||
{(props.building.date_source == dataFields.date_source.items[0] ||
|
|
||||||
props.building.date_source == dataFields.date_source.items[1] ||
|
|
||||||
props.building.date_source == null) ? <></> :
|
|
||||||
<>
|
|
||||||
<MultiDataEntry
|
|
||||||
title={dataFields.date_link.title}
|
|
||||||
slug="date_link"
|
|
||||||
value={props.building.date_link}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.date_link.tooltip}
|
|
||||||
placeholder="https://..."
|
|
||||||
editableEntries={true}
|
|
||||||
isUrl={true}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
<hr/>
|
|
||||||
<LogicalDataEntry
|
<LogicalDataEntry
|
||||||
title={dataFields.has_extension.title}
|
title={dataFields.has_extension.title}
|
||||||
slug="has_extension"
|
slug="has_extension"
|
||||||
@ -81,7 +31,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.has_extension.tooltip}
|
tooltip={dataFields.has_extension.tooltip}
|
||||||
/>
|
/>
|
||||||
{props.building.has_extension ? (
|
{props.building.has_extension!=null && !props.building.has_extension ? (
|
||||||
<>
|
<>
|
||||||
<NumericDataEntry
|
<NumericDataEntry
|
||||||
slug='extension_year'
|
slug='extension_year'
|
||||||
@ -135,7 +85,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
</>
|
</>
|
||||||
) : (null)}
|
) : (null)}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Land ownership data">
|
<DataEntryGroup name="Land ownership">
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
title={dataFields.landowner.title}
|
title={dataFields.landowner.title}
|
||||||
slug="landowner"
|
slug="landowner"
|
||||||
@ -146,6 +96,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
tooltip={dataFields.landowner.tooltip}
|
tooltip={dataFields.landowner.tooltip}
|
||||||
placeholder=""
|
placeholder=""
|
||||||
editableEntries={true}
|
editableEntries={true}
|
||||||
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="landowner"
|
slug="landowner"
|
||||||
@ -155,6 +106,18 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
user_verified_as={props.user_verified.landowner}
|
user_verified_as={props.user_verified.landowner}
|
||||||
verified_count={props.building.verified.landowner}
|
verified_count={props.building.verified.landowner}
|
||||||
/>
|
/>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.landowner_links.title}
|
||||||
|
slug="landowner_links"
|
||||||
|
value={props.building.landowner_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.landowner_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.landowner_source_type.title}
|
title={dataFields.landowner_source_type.title}
|
||||||
slug="landowner_source_type"
|
slug="landowner_source_type"
|
||||||
@ -185,7 +148,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Developer data">
|
<DataEntryGroup name="Developer">
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
slug='developer_type'
|
slug='developer_type'
|
||||||
title={dataFields.developer_type.title}
|
title={dataFields.developer_type.title}
|
||||||
@ -213,6 +176,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
tooltip={dataFields.developer_name.tooltip}
|
tooltip={dataFields.developer_name.tooltip}
|
||||||
placeholder=""
|
placeholder=""
|
||||||
editableEntries={true}
|
editableEntries={true}
|
||||||
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="developer_name"
|
slug="developer_name"
|
||||||
@ -222,6 +186,18 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
user_verified_as={props.user_verified.developer_name}
|
user_verified_as={props.user_verified.developer_name}
|
||||||
verified_count={props.building.verified.developer_name}
|
verified_count={props.building.verified.developer_name}
|
||||||
/>
|
/>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.developer_links.title}
|
||||||
|
slug="developer_links"
|
||||||
|
value={props.building.developer_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.developer_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
title={dataFields.developer_source_type.title}
|
title={dataFields.developer_source_type.title}
|
||||||
slug="developer_source_type"
|
slug="developer_source_type"
|
||||||
@ -252,7 +228,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Designer data">
|
<DataEntryGroup name="Designer">
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
title={dataFields.designers.title}
|
title={dataFields.designers.title}
|
||||||
slug="designers"
|
slug="designers"
|
||||||
@ -263,6 +239,7 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
tooltip={dataFields.designers.tooltip}
|
tooltip={dataFields.designers.tooltip}
|
||||||
placeholder=""
|
placeholder=""
|
||||||
editableEntries={true}
|
editableEntries={true}
|
||||||
|
disabled={true}
|
||||||
/>
|
/>
|
||||||
<Verification
|
<Verification
|
||||||
slug="designers"
|
slug="designers"
|
||||||
@ -272,7 +249,18 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
user_verified_as={props.user_verified.designers}
|
user_verified_as={props.user_verified.designers}
|
||||||
verified_count={props.building.verified.designers}
|
verified_count={props.building.verified.designers}
|
||||||
/>
|
/>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.designers_links.title}
|
||||||
|
slug="designers_links"
|
||||||
|
value={props.building.designers_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.designers_links.tooltip}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
<SelectDataEntry
|
<SelectDataEntry
|
||||||
slug='lead_designer_type'
|
slug='lead_designer_type'
|
||||||
title={dataFields.lead_designer_type.title}
|
title={dataFields.lead_designer_type.title}
|
||||||
@ -319,98 +307,113 @@ const TeamView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|||||||
/>
|
/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
<hr/>
|
</DataEntryGroup>
|
||||||
<LogicalDataEntryYesOnly
|
<DataEntryGroup name="Builder">
|
||||||
slug='designer_awards'
|
|
||||||
title={dataFields.designer_awards.title}
|
|
||||||
tooltip={dataFields.designer_awards.tooltip}
|
|
||||||
value={props.building.designer_awards}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
mode={props.mode}
|
|
||||||
/>
|
|
||||||
<Verification
|
|
||||||
slug="designer_awards"
|
|
||||||
allow_verify={props.user !== undefined && props.building.designer_awards !== null && !props.edited}
|
|
||||||
onVerify={props.onVerify}
|
|
||||||
user_verified={props.user_verified.hasOwnProperty("designer_awards")}
|
|
||||||
user_verified_as={props.user_verified.designer_awards}
|
|
||||||
verified_count={props.building.verified.designer_awards}
|
|
||||||
/>
|
|
||||||
{props.building.designer_awards ? (
|
|
||||||
<>
|
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
title={dataFields.awards_source_link.title}
|
title={dataFields.builder.title}
|
||||||
slug="awards_source_link"
|
slug="builder"
|
||||||
value={props.building.awards_source_link}
|
value={props.building.builder}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
tooltip={dataFields.awards_source_link.tooltip}
|
tooltip={dataFields.builder.tooltip}
|
||||||
|
placeholder=""
|
||||||
|
editableEntries={true}
|
||||||
|
disabled={true}
|
||||||
|
/>
|
||||||
|
<Verification
|
||||||
|
slug="builder"
|
||||||
|
allow_verify={props.user !== undefined && props.building.builder !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("builder")}
|
||||||
|
user_verified_as={props.user_verified.builder}
|
||||||
|
verified_count={props.building.verified.builder}
|
||||||
|
/>
|
||||||
|
<MultiDataEntry
|
||||||
|
title={dataFields.builder_links.title}
|
||||||
|
slug="builder_links"
|
||||||
|
value={props.building.builder_links}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.builder_links.tooltip}
|
||||||
placeholder="https://..."
|
placeholder="https://..."
|
||||||
editableEntries={true}
|
editableEntries={true}
|
||||||
isUrl={true}
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
<SelectDataEntry
|
||||||
|
title={dataFields.builder_source_type.title}
|
||||||
|
slug="builder_source_type"
|
||||||
|
value={props.building.builder_source_type}
|
||||||
|
mode={props.mode}
|
||||||
|
copy={props.copy}
|
||||||
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.builder_source_type.tooltip}
|
||||||
|
options={dataFields.builder_source_type.items}
|
||||||
|
placeholder={dataFields.builder_source_type.example}
|
||||||
/>
|
/>
|
||||||
<Verification
|
{(props.building.builder_source_type == commonSourceTypes[0] ||
|
||||||
slug="awards_source_link"
|
props.building.builder_source_type == commonSourceTypes[1] ||
|
||||||
allow_verify={props.user !== undefined && props.building.awards_source_link !== null && !props.edited}
|
props.building.builder_source_type == null) ? <></> :
|
||||||
onVerify={props.onVerify}
|
<>
|
||||||
user_verified={props.user_verified.hasOwnProperty("awards_source_link")}
|
<MultiDataEntry
|
||||||
user_verified_as={props.user_verified.awards_source_link}
|
title={dataFields.builder_source_link.title}
|
||||||
verified_count={props.building.verified.awards_source_link}
|
slug="builder_source_link"
|
||||||
/>
|
value={props.building.builder_source_link}
|
||||||
</>
|
mode={props.mode}
|
||||||
) : (null)
|
copy={props.copy}
|
||||||
}
|
onChange={props.onChange}
|
||||||
|
placeholder="https://..."
|
||||||
|
editableEntries={true}
|
||||||
|
isUrl={true}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
</DataEntryGroup>
|
</DataEntryGroup>
|
||||||
<DataEntryGroup name="Builder data">
|
<DataEntryGroup name="Awards">
|
||||||
<MultiDataEntry
|
<LogicalDataEntryYesOnly
|
||||||
title={dataFields.builder.title}
|
slug='designer_awards'
|
||||||
slug="builder"
|
title={dataFields.designer_awards.title}
|
||||||
value={props.building.builder}
|
tooltip={dataFields.designer_awards.tooltip}
|
||||||
mode={props.mode}
|
value={props.building.designer_awards}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
placeholder=""
|
mode={props.mode}
|
||||||
editableEntries={true}
|
/>
|
||||||
/>
|
<Verification
|
||||||
<Verification
|
slug="designer_awards"
|
||||||
slug="builder"
|
allow_verify={props.user !== undefined && props.building.designer_awards !== null && !props.edited}
|
||||||
allow_verify={props.user !== undefined && props.building.builder !== null && !props.edited}
|
onVerify={props.onVerify}
|
||||||
onVerify={props.onVerify}
|
user_verified={props.user_verified.hasOwnProperty("designer_awards")}
|
||||||
user_verified={props.user_verified.hasOwnProperty("builder")}
|
user_verified_as={props.user_verified.designer_awards}
|
||||||
user_verified_as={props.user_verified.builder}
|
verified_count={props.building.verified.designer_awards}
|
||||||
verified_count={props.building.verified.builder}
|
/>
|
||||||
/>
|
{props.building.designer_awards ? (
|
||||||
<SelectDataEntry
|
<>
|
||||||
title={dataFields.builder_source_type.title}
|
|
||||||
slug="builder_source_type"
|
|
||||||
value={props.building.builder_source_type}
|
|
||||||
mode={props.mode}
|
|
||||||
copy={props.copy}
|
|
||||||
onChange={props.onChange}
|
|
||||||
tooltip={dataFields.builder_source_type.tooltip}
|
|
||||||
options={dataFields.builder_source_type.items}
|
|
||||||
placeholder={dataFields.builder_source_type.example}
|
|
||||||
/>
|
|
||||||
{(props.building.builder_source_type == commonSourceTypes[0] ||
|
|
||||||
props.building.builder_source_type == commonSourceTypes[1] ||
|
|
||||||
props.building.builder_source_type == null) ? <></> :
|
|
||||||
<>
|
|
||||||
<MultiDataEntry
|
<MultiDataEntry
|
||||||
title={dataFields.builder_source_link.title}
|
title={dataFields.awards_source_link.title}
|
||||||
slug="builder_source_link"
|
slug="awards_source_link"
|
||||||
value={props.building.builder_source_link}
|
value={props.building.awards_source_link}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
copy={props.copy}
|
copy={props.copy}
|
||||||
onChange={props.onChange}
|
onChange={props.onChange}
|
||||||
|
tooltip={dataFields.awards_source_link.tooltip}
|
||||||
placeholder="https://..."
|
placeholder="https://..."
|
||||||
editableEntries={true}
|
editableEntries={true}
|
||||||
isUrl={true}
|
isUrl={true}
|
||||||
/>
|
/>
|
||||||
</>
|
<Verification
|
||||||
}
|
slug="awards_source_link"
|
||||||
</DataEntryGroup>
|
allow_verify={props.user !== undefined && props.building.awards_source_link !== null && !props.edited}
|
||||||
|
onVerify={props.onVerify}
|
||||||
|
user_verified={props.user_verified.hasOwnProperty("awards_source_link")}
|
||||||
|
user_verified_as={props.user_verified.awards_source_link}
|
||||||
|
verified_count={props.building.verified.awards_source_link}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
) : (null)
|
||||||
|
}
|
||||||
|
</DataEntryGroup>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -183,4 +183,17 @@
|
|||||||
.source-url {
|
.source-url {
|
||||||
padding-top: 0px;
|
padding-top: 0px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
dd {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uprn-list {
|
||||||
|
margin-top: 10px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.uprn-list li {
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
@ -338,11 +338,11 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} =
|
|||||||
{
|
{
|
||||||
mapStyle: 'is_domestic',
|
mapStyle: 'is_domestic',
|
||||||
legend: {
|
legend: {
|
||||||
title: 'Domestic building',
|
title: 'Residential building',
|
||||||
elements: [
|
elements: [
|
||||||
{ color: '#f7ec25', text: 'Domestic' },
|
{ color: '#f7ec25', text: 'Residential' },
|
||||||
{ color: '#fc9b2a', text: 'Mixed' },
|
{ color: '#fc9b2a', text: 'Mixed' },
|
||||||
{ color: '#ff2121', text: 'Non-domestic' },
|
{ color: '#ff2121', text: 'Non-residential' },
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ import ResilienceContainer from '../building/data-containers/resilience';
|
|||||||
import LocationContainer from '../building/data-containers/location';
|
import LocationContainer from '../building/data-containers/location';
|
||||||
import PlanningContainer from '../building/data-containers/planning';
|
import PlanningContainer from '../building/data-containers/planning';
|
||||||
import SizeContainer from '../building/data-containers/size';
|
import SizeContainer from '../building/data-containers/size';
|
||||||
import StreetscapeContainer from '../building/data-containers/street-context';
|
import StreetContextContainer from '../building/data-containers/street-context';
|
||||||
import SustainabilityContainer from '../building/data-containers/energy-performance';
|
import SustainabilityContainer from '../building/data-containers/energy-performance';
|
||||||
import TeamContainer from '../building/data-containers/team';
|
import TeamContainer from '../building/data-containers/team';
|
||||||
import TypeContainer from '../building/data-containers/typology';
|
import TypeContainer from '../building/data-containers/typology';
|
||||||
@ -22,7 +22,7 @@ export const categoryUiConfig: {[key in Category]: DataContainerType} = {
|
|||||||
[Category.Age]: AgeContainer,
|
[Category.Age]: AgeContainer,
|
||||||
[Category.Size]: SizeContainer,
|
[Category.Size]: SizeContainer,
|
||||||
[Category.Construction]: ConstructionContainer,
|
[Category.Construction]: ConstructionContainer,
|
||||||
[Category.StreetContext]: StreetscapeContainer,
|
[Category.StreetContext]: StreetContextContainer,
|
||||||
[Category.Team]: TeamContainer,
|
[Category.Team]: TeamContainer,
|
||||||
[Category.Planning]: PlanningContainer,
|
[Category.Planning]: PlanningContainer,
|
||||||
[Category.EnergyPerformance]: SustainabilityContainer,
|
[Category.EnergyPerformance]: SustainabilityContainer,
|
||||||
|
@ -6,13 +6,14 @@ let ccconfig: CCConfig = require('../../cc-config.json')
|
|||||||
* Common list of Source Types, used in multiple menus
|
* Common list of Source Types, used in multiple menus
|
||||||
*/
|
*/
|
||||||
export const commonSourceTypes = [
|
export const commonSourceTypes = [
|
||||||
"Assessed by eye",
|
"Assessed by eye/personal knowledge of the building",
|
||||||
"Assessed using expert knowledge of building or building type",
|
"Assessed using professional knowledge of building or building type",
|
||||||
"Assessed using streetview photographs or satellite imagery",
|
"Assessed using streetview photographs, satellite imagery or maps",
|
||||||
"Assessed by specialist emergency group",
|
"Assessed by specialist emergency group",
|
||||||
|
"Current government record/database",
|
||||||
"Live streamed from a government source",
|
"Live streamed from a government source",
|
||||||
"Current government record/dataset",
|
"Open database",
|
||||||
"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",
|
||||||
];
|
];
|
||||||
@ -144,8 +145,14 @@ export const buildingUserFields = {
|
|||||||
export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||||
location_name: {
|
location_name: {
|
||||||
category: Category.Location,
|
category: Category.Location,
|
||||||
title: "Building name (non-domestic)",
|
title: "Building name (non-residential)",
|
||||||
tooltip: "Link to a website with the name of the building.<br/><br/>(For security reasons, we currently only collect the names of non-residential buildings).",
|
tooltip: "The name of the building.<br/><br/>(For security reasons, we currently only collect the names of non-residential buildings).",
|
||||||
|
example: "Broadcasting House",
|
||||||
|
},
|
||||||
|
location_name_link: {
|
||||||
|
category: Category.Location,
|
||||||
|
title: "Building name link",
|
||||||
|
tooltip: "Link to a website with the name of the building.",
|
||||||
example: "https://en.wikipedia.org/wiki/Palace_of_Westminster",
|
example: "https://en.wikipedia.org/wiki/Palace_of_Westminster",
|
||||||
},
|
},
|
||||||
location_number: {
|
location_number: {
|
||||||
@ -156,7 +163,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
location_street: {
|
location_street: {
|
||||||
category: Category.Location,
|
category: Category.Location,
|
||||||
title: "Street",
|
title: "Street name",
|
||||||
example: "Gower Street",
|
example: "Gower Street",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
@ -176,7 +183,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
category: Category.Location,
|
category: Category.Location,
|
||||||
title: "Area code/"+ccconfig.postcode,
|
title: "Area code/"+ccconfig.postcode,
|
||||||
example: "W1W 6TR",
|
example: "W1W 6TR",
|
||||||
//tooltip: ,
|
tooltip: "Correctly formatted UK postcode, i.e. NW1 2FB",
|
||||||
},
|
},
|
||||||
location_address_source: {
|
location_address_source: {
|
||||||
category: Category.Location,
|
category: Category.Location,
|
||||||
@ -194,9 +201,15 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
ref_toid: {
|
ref_toid: {
|
||||||
category: Category.Location,
|
category: Category.Location,
|
||||||
title: "Building footprint ID",
|
title: "Building footprint ID",
|
||||||
tooltip: "Ordnance Survey Topography Layer ID (TOID) [<a href='https://www.ordnancesurvey.co.uk/business-government/products/open-toid'>link</a>]",
|
tooltip: "Ordnance Survey Topography Layer ID (TOID)",
|
||||||
example: "",
|
example: "",
|
||||||
},
|
},
|
||||||
|
location_alternative_footprint_links: {
|
||||||
|
category: Category.Location,
|
||||||
|
title: "Alternative open building footprint links",
|
||||||
|
tooltip: "Links to alternative building footprint datasets (include the direct link to the footprint of this building where possible).",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UPRNs is not part of the buildings table, but the string fields
|
* UPRNs is not part of the buildings table, but the string fields
|
||||||
@ -205,7 +218,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
uprns: {
|
uprns: {
|
||||||
category: Category.Location,
|
category: Category.Location,
|
||||||
title: "Unique Property Reference Number(s) (UPRN)",
|
title: "Unique Property Reference Number(s) (UPRN)",
|
||||||
tooltip: "Unique Property Reference Numbers (to be filled automatically) [<a href='https://beta.ordnancesurvey.co.uk/products/os-open-uprn'>LINK</a>]",
|
tooltip: "Unique Property Reference Number(s) (UPRN) (derived automatically)",
|
||||||
example: [{ uprn: "", parent_uprn: "" }, { uprn: "", parent_uprn: "" }],
|
example: [{ uprn: "", parent_uprn: "" }, { uprn: "", parent_uprn: "" }],
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -218,11 +231,10 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
ref_osm_id: {
|
ref_osm_id: {
|
||||||
category: Category.Location,
|
category: Category.Location,
|
||||||
title: "OpenStreetMap ID",
|
title: "OpenStreetMap ID",
|
||||||
tooltip: "OpenStreetMap feature ID",
|
tooltip: "OpenStreetMap building ('way') ID - Numerical string of up to 9 characters",
|
||||||
example: "",
|
example: "",
|
||||||
},
|
},
|
||||||
location_latitude: {
|
location_latitude: {
|
||||||
@ -267,15 +279,16 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
title: "Source type",
|
title: "Source type",
|
||||||
tooltip: "Source for the current land use",
|
tooltip: "Source for the current land use",
|
||||||
example: "",
|
example: "",
|
||||||
items: [
|
items: commonSourceTypes
|
||||||
"Expert/personal knowledge of building",
|
// items: [
|
||||||
"Online streetview image",
|
// "Expert/personal knowledge of building",
|
||||||
"Open planning authority dataset",
|
// "Online streetview image",
|
||||||
"Open property tax dataset",
|
// "Open planning authority dataset",
|
||||||
"Open housing dataset",
|
// "Open property tax dataset",
|
||||||
"Open address dataset",
|
// "Open housing dataset",
|
||||||
"Other"
|
// "Open address dataset",
|
||||||
],
|
// "Other"
|
||||||
|
// ],
|
||||||
},
|
},
|
||||||
current_landuse_source_detail: {
|
current_landuse_source_detail: {
|
||||||
category: Category.LandUse,
|
category: Category.LandUse,
|
||||||
@ -342,7 +355,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
facade_year: {
|
facade_year: {
|
||||||
category: Category.Age,
|
category: Category.Age,
|
||||||
title: "Date of front of building",
|
title: "Date of front of building (best estimate)",
|
||||||
tooltip: "Best estimate",
|
tooltip: "Best estimate",
|
||||||
example: 1900,
|
example: 1900,
|
||||||
},
|
},
|
||||||
@ -416,7 +429,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
category: Category.Size,
|
category: Category.Size,
|
||||||
title: "Height to apex (m)",
|
title: "Height to apex (m)",
|
||||||
example: 100.5,
|
example: 100.5,
|
||||||
tooltip: "i.e. the highest part of the roof.",
|
tooltip: "i.e. the highest part of the roof (in meters).",
|
||||||
},
|
},
|
||||||
size_height_apex_source_type: {
|
size_height_apex_source_type: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
@ -435,7 +448,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
category: Category.Size,
|
category: Category.Size,
|
||||||
title: "Height to eaves (m)",
|
title: "Height to eaves (m)",
|
||||||
example: 20.33,
|
example: 20.33,
|
||||||
tooltip: "i.e. to where the top of the wall meets the roof",
|
tooltip: "i.e. to where the top of the wall meets the roof (in meters)",
|
||||||
},
|
},
|
||||||
size_height_eaves_source_type: {
|
size_height_eaves_source_type: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
@ -479,7 +492,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
category: Category.Size,
|
category: Category.Size,
|
||||||
title: "Frontage width (m)",
|
title: "Frontage width (m)",
|
||||||
example: 12.2,
|
example: 12.2,
|
||||||
//tooltip: ,
|
tooltip: "Size of the frontage of the building (in meters)",
|
||||||
},
|
},
|
||||||
size_width_frontage_source_type: {
|
size_width_frontage_source_type: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
@ -583,19 +596,19 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
|
|
||||||
sust_breeam_rating: {
|
sust_breeam_rating: {
|
||||||
category: Category.EnergyPerformance,
|
category: Category.EnergyPerformance,
|
||||||
title: "Official environmental quality rating",
|
title: "Residential energy rating",
|
||||||
tooltip: ccconfig.energy_rating,
|
tooltip: ccconfig.energy_rating,
|
||||||
example: "",
|
example: "",
|
||||||
},
|
},
|
||||||
sust_dec: {
|
sust_dec: {
|
||||||
category: Category.EnergyPerformance,
|
category: Category.EnergyPerformance,
|
||||||
title: "Non-domestic Building Energy Rating",
|
title: "Non-residential Building Energy Rating",
|
||||||
tooltip: "Display Energy Certificate (DEC) Any public building should have (and display) a DEC. Showing how the energy use for that building compares to other buildings with same use",
|
tooltip: "Display Energy Certificate (DEC) Any public building should have (and display) a DEC. Showing how the energy use for that building compares to other buildings with same use",
|
||||||
example: "G",
|
example: "G",
|
||||||
},
|
},
|
||||||
sust_aggregate_estimate_epc: {
|
sust_aggregate_estimate_epc: {
|
||||||
category: Category.EnergyPerformance,
|
category: Category.EnergyPerformance,
|
||||||
title: "Domestic Building Energy Rating",
|
title: "Residential Building Energy Rating",
|
||||||
tooltip: "Energy Performance Certificate (EPC) Any premises sold or rented is required to have an EPC to show how energy efficient it is. Only buildings rate grade E or higher may be rented",
|
tooltip: "Energy Performance Certificate (EPC) Any premises sold or rented is required to have an EPC to show how energy efficient it is. Only buildings rate grade E or higher may be rented",
|
||||||
example: "",
|
example: "",
|
||||||
},
|
},
|
||||||
@ -716,7 +729,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
planning_list_grade: {
|
planning_list_grade: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "What is its rating?",
|
title: "What is its protection rating?",
|
||||||
example: "II",
|
example: "II",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
@ -740,19 +753,19 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
planning_in_apa_url: {
|
planning_in_apa_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Is it in an area if archaeological priority?",
|
title: "Is the building in an area of archaeological priority?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_local_list_url: {
|
planning_local_list_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Is it a locally listed heritage asset?",
|
title: "Is the building a locally listed heritage asset?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
planning_historic_area_assessment_url: {
|
planning_historic_area_assessment_url: {
|
||||||
category: Category.Planning,
|
category: Category.Planning,
|
||||||
title: "Does it have any other kind of historic area assessment?",
|
title: "Does it have any other type of designation?",
|
||||||
example: "",
|
example: "",
|
||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
@ -764,8 +777,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
is_domestic: {
|
is_domestic: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Is the building a home/domestic building?",
|
title: "Is the building a home/residential building?",
|
||||||
tooltip: "Note: Homes used as offices for working from home should be classified as domestic.",
|
tooltip: "Note: Homes used as offices for working from home should be classified as residential.",
|
||||||
example: "mixed domestic/non-domestic",
|
example: "mixed domestic/non-domestic",
|
||||||
items: [
|
items: [
|
||||||
"Yes",
|
"Yes",
|
||||||
@ -776,14 +789,14 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
is_domestic_source: {
|
is_domestic_source: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Source type",
|
title: "Source type",
|
||||||
tooltip: "Source of domestic/non-domestic data",
|
tooltip: "Source of residential/non-residential data",
|
||||||
example: "",
|
example: "",
|
||||||
items: commonSourceTypes
|
items: commonSourceTypes
|
||||||
},
|
},
|
||||||
is_domestic_links: {
|
is_domestic_links: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Source links",
|
title: "Source links",
|
||||||
tooltip: "URL(s) for domestic/non-domestic data source(s)",
|
tooltip: "URL(s) for residential/non-residential data source(s)",
|
||||||
example: ["", "", ""],
|
example: ["", "", ""],
|
||||||
},
|
},
|
||||||
likes_total: {
|
likes_total: {
|
||||||
@ -811,19 +824,19 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
|
|
||||||
community_activities_current: {
|
community_activities_current: {
|
||||||
category: Category.Community,
|
category: Category.Community,
|
||||||
title: "Are activities open to the community currently taking place in the building?",
|
title: "Is this building currently used for community activities?",
|
||||||
tooltip: "E.g. youth club, place of worship, GP surgery, pub",
|
tooltip: "E.g. youth club, place of worship, GP surgery, pub",
|
||||||
example: true
|
example: true
|
||||||
},
|
},
|
||||||
community_activities: {
|
community_activities: {
|
||||||
category: Category.Community,
|
category: Category.Community,
|
||||||
title: "Has this ever been used for community activities in the past?",
|
title: "If not been used for community activities in the past?",
|
||||||
tooltip: "E.g. youth club, place of worship, GP surgery, pub",
|
tooltip: "E.g. youth club, place of worship, GP surgery, pub",
|
||||||
example: true
|
example: true
|
||||||
},
|
},
|
||||||
community_activities_always: {
|
community_activities_always: {
|
||||||
category: Category.Community,
|
category: Category.Community,
|
||||||
title: "Has the building always been used for community activities?",
|
title: "If in community use now, has it always been used for community activities?",
|
||||||
tooltip: "E.g. youth club, place of worship, GP surgery, pub",
|
tooltip: "E.g. youth club, place of worship, GP surgery, pub",
|
||||||
example: true
|
example: true
|
||||||
},
|
},
|
||||||
@ -837,11 +850,15 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
title: "Is the building in public/community ownership?",
|
title: "Is the building in public/community ownership?",
|
||||||
example: "Privately owned (non-corporate)",
|
example: "Privately owned (non-corporate)",
|
||||||
items: [
|
items: [
|
||||||
'Government-owned',
|
"Public/State body",
|
||||||
'Charity-owned',
|
"Public body with Private company",
|
||||||
'Community-owned/cooperative',
|
"Charity",
|
||||||
'Owned by other non-profit body',
|
"Community group/Cooperative",
|
||||||
'Not in public/community ownership'
|
"Other non-profit body",
|
||||||
|
"Privately owned company",
|
||||||
|
"Privately owned offshore company",
|
||||||
|
"Private individual",
|
||||||
|
"Other",
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
community_public_ownership_sources: {
|
community_public_ownership_sources: {
|
||||||
@ -892,8 +909,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
has_extension: {
|
has_extension: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Was a later extension added?",
|
title: "Does this information relate to the original main building?",
|
||||||
tooltip: "",
|
tooltip: "If the data in this section relates to the original main building, select \"yes\". If the data relates to a later extension/ redevelopment, select \"no\".",
|
||||||
example: false
|
example: false
|
||||||
},
|
},
|
||||||
extension_year: {
|
extension_year: {
|
||||||
@ -934,7 +951,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
developer_name: {
|
developer_name: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Who were the developer(s)?",
|
title: "Who were the developer(s)?",
|
||||||
tooltip: "Free text. First name, space, then Last name",
|
tooltip: "Name(s) of the building's developers.<br/><br/>Free-text entry disabled for security reasons.",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
developer_links: {
|
||||||
|
category: Category.Team,
|
||||||
|
title: "Developer link(s)",
|
||||||
|
tooltip: "Link(s) to webpage(s) explaining who developed the building.",
|
||||||
example: ["", "", ""],
|
example: ["", "", ""],
|
||||||
},
|
},
|
||||||
developer_source_type: {
|
developer_source_type: {
|
||||||
@ -953,7 +976,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
landowner: {
|
landowner: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Landowner(s) at time of construction",
|
title: "Landowner(s) at time of construction",
|
||||||
tooltip: "Free text. First name, space, then Last name",
|
tooltip: "Land owner when the building was constructed.<br/><br/>Free-text entry disabled for security reasons.<br/><br/>For info on current land ownership, see 'Planning Controls'.",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
landowner_links: {
|
||||||
|
category: Category.Team,
|
||||||
|
title: "Landowner link(s)",
|
||||||
|
tooltip: "Link(s) to webpage(s) explaining who owned the land when when the building was built.",
|
||||||
example: ["", "", ""],
|
example: ["", "", ""],
|
||||||
},
|
},
|
||||||
landowner_source_type: {
|
landowner_source_type: {
|
||||||
@ -972,7 +1001,13 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
designers: {
|
designers: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Who were the main designer(s)?",
|
title: "Who were the main designer(s)?",
|
||||||
tooltip: "Free text. First name, space, then Last name",
|
tooltip: "Free-text entry disabled for security reasons.",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
designers_links: {
|
||||||
|
category: Category.Team,
|
||||||
|
title: "Designer link(s)",
|
||||||
|
tooltip: "Link(s) to webpage(s) explaining who designed the building.",
|
||||||
example: ["", "", ""],
|
example: ["", "", ""],
|
||||||
},
|
},
|
||||||
designers_source_type: {
|
designers_source_type: {
|
||||||
@ -1003,19 +1038,26 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
designer_awards: {
|
designer_awards: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Did the design team win any awards for this building?",
|
title: "Has the building won any awards?",
|
||||||
tooltip: "",
|
tooltip: "",
|
||||||
example: false
|
example: false
|
||||||
},
|
},
|
||||||
awards_source_link: {
|
awards_source_link: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Source link(s) for designer award(s)",
|
title: "Source link(s) for building award(s)",
|
||||||
tooltip: "URL for source for designer award(s)",
|
tooltip: "URL for source for building award(s)",
|
||||||
example: ["", "", ""],
|
example: ["", "", ""],
|
||||||
},
|
},
|
||||||
builder: {
|
builder: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Name of builder/construction team",
|
title: "Name of builder/construction team.",
|
||||||
|
tooltip: "Free-text entry disabled for security reasons.",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
builder_links: {
|
||||||
|
category: Category.Team,
|
||||||
|
title: "Builder link(s)",
|
||||||
|
tooltip: "Link(s) to webpage(s) explaining who built the building.",
|
||||||
example: ["", "", ""],
|
example: ["", "", ""],
|
||||||
},
|
},
|
||||||
builder_source_type: {
|
builder_source_type: {
|
||||||
@ -1098,31 +1140,19 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
category: Category.StreetContext,
|
category: Category.StreetContext,
|
||||||
title: "Does the building have a front garden?",
|
title: "Does the building have a front garden?",
|
||||||
tooltip: "Is the front garden mainly green/planted?",
|
tooltip: "Is the front garden mainly green/planted?",
|
||||||
example: "",
|
example: true,
|
||||||
items: [
|
|
||||||
"Yes",
|
|
||||||
"No"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
context_back_garden: {
|
context_back_garden: {
|
||||||
category: Category.StreetContext,
|
category: Category.StreetContext,
|
||||||
title: "Does the building have a back garden?",
|
title: "Does the building have a back garden?",
|
||||||
tooltip: "Is the back garden mainly green/planted?",
|
tooltip: "Is the back garden mainly green/planted?",
|
||||||
example: "",
|
example: true
|
||||||
items: [
|
|
||||||
"Yes",
|
|
||||||
"No"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
context_flats_garden: {
|
context_flats_garden: {
|
||||||
category: Category.StreetContext,
|
category: Category.StreetContext,
|
||||||
title: "Is the building flats with a dedicated green space?",
|
title: "Are flats with a dedicated green space?",
|
||||||
tooltip: "If the building is a block of flats, does it have a dedicated garden area/green space?",
|
tooltip: "If the building is a block of flats, does it have a dedicated garden area/green space?",
|
||||||
example: "",
|
example: true
|
||||||
items: [
|
|
||||||
"Yes",
|
|
||||||
"No"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
context_garden_source_type: {
|
context_garden_source_type: {
|
||||||
category: Category.StreetContext,
|
category: Category.StreetContext,
|
||||||
@ -1139,8 +1169,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
context_street_width: {
|
context_street_width: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Street width (m)",
|
title: "Average street width (m)",
|
||||||
tooltip: "Width of the street in metres.",
|
tooltip: "Average width of the street in metres.",
|
||||||
example: 10
|
example: 10
|
||||||
},
|
},
|
||||||
context_street_width_source_type: {
|
context_street_width_source_type: {
|
||||||
@ -1158,8 +1188,8 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
context_pavement_width: {
|
context_pavement_width: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Pavement width (m)",
|
title: "Average pavement width (m)",
|
||||||
tooltip: "Width of the pavement in metres.",
|
tooltip: "Average width of the pavement in metres.",
|
||||||
example: 10
|
example: 10
|
||||||
},
|
},
|
||||||
context_pavement_width_source_type: {
|
context_pavement_width_source_type: {
|
||||||
@ -1178,7 +1208,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
context_green_space_distance: {
|
context_green_space_distance: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Distance to nearest green space (m)",
|
title: "Distance to nearest green space (m)",
|
||||||
tooltip: "Approximate distance from the front door of the building to the nearest public green space.",
|
tooltip: "Approximate distance from the front door of the building to the nearest public green space (in meters).",
|
||||||
example: 10
|
example: 10
|
||||||
},
|
},
|
||||||
context_green_space_distance_source_type: {
|
context_green_space_distance_source_type: {
|
||||||
@ -1197,7 +1227,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
context_tree_distance: {
|
context_tree_distance: {
|
||||||
category: Category.Team,
|
category: Category.Team,
|
||||||
title: "Distance to nearest tree (m)",
|
title: "Distance to nearest tree (m)",
|
||||||
tooltip: "Approximate distance from the front door of the building to the nearest tree.",
|
tooltip: "Approximate distance from the front door of the building to the nearest tree in meters.",
|
||||||
example: 10
|
example: 10
|
||||||
},
|
},
|
||||||
context_tree_distance_source_type: {
|
context_tree_distance_source_type: {
|
||||||
@ -1234,7 +1264,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
age_cladding_date: {
|
age_cladding_date: {
|
||||||
category: Category.Age,
|
category: Category.Age,
|
||||||
title: "Cladding date",
|
title: "Cladding date (best estimate)",
|
||||||
tooltip: "Width of the street in metres.",
|
tooltip: "Width of the street in metres.",
|
||||||
example: 1970
|
example: 1970
|
||||||
},
|
},
|
||||||
@ -1253,7 +1283,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
age_extension_date: {
|
age_extension_date: {
|
||||||
category: Category.Age,
|
category: Category.Age,
|
||||||
title: "Date of significant extensions",
|
title: "Date of significant extensions (best estimate)",
|
||||||
tooltip: "Width of the street in metres.",
|
tooltip: "Width of the street in metres.",
|
||||||
example: 1970
|
example: 1970
|
||||||
},
|
},
|
||||||
@ -1272,7 +1302,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
},
|
},
|
||||||
age_retrofit_date: {
|
age_retrofit_date: {
|
||||||
category: Category.Age,
|
category: Category.Age,
|
||||||
title: "Date of significant retrofits",
|
title: "Date of last significant retrofit (best estimate)",
|
||||||
tooltip: "Width of the street in metres.",
|
tooltip: "Width of the street in metres.",
|
||||||
example: 1970
|
example: 1970
|
||||||
},
|
},
|
||||||
@ -1289,6 +1319,57 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
|||||||
tooltip: "Source link(s) for street width data",
|
tooltip: "Source link(s) for street width data",
|
||||||
example: ["", "", ""],
|
example: ["", "", ""],
|
||||||
},
|
},
|
||||||
|
age_historical_raster_map_links: {
|
||||||
|
category: Category.Age,
|
||||||
|
title: "Historical maps links",
|
||||||
|
tooltip: "Links to rasterised historical maps",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
age_historical_vectorised_footprint_links: {
|
||||||
|
category: Category.Age,
|
||||||
|
title: "Extracted vectorised historical footprints links",
|
||||||
|
tooltip: "Extracted vectorised historical footprints links",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
|
||||||
|
energy_solar: {
|
||||||
|
category: Category.EnergyPerformance,
|
||||||
|
title: "Does the building have solar panels?",
|
||||||
|
tooltip: "Are there any kinds of solar panels on the roof of the building?",
|
||||||
|
example: true
|
||||||
|
},
|
||||||
|
energy_solar_source_type: {
|
||||||
|
category: Category.EnergyPerformance,
|
||||||
|
title: "Source type",
|
||||||
|
tooltip: "Source type for street width data",
|
||||||
|
example: "",
|
||||||
|
items: commonSourceTypes
|
||||||
|
},
|
||||||
|
energy_solar_source_links: {
|
||||||
|
category: Category.EnergyPerformance,
|
||||||
|
title: "Source link(s)",
|
||||||
|
tooltip: "Source link(s) for street width data",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
|
energy_green_roof: {
|
||||||
|
category: Category.EnergyPerformance,
|
||||||
|
title: "Does the building have green walls/green roof?",
|
||||||
|
tooltip: "Are there any green walls, or a green roof, on the building?",
|
||||||
|
example: true
|
||||||
|
},
|
||||||
|
energy_green_roof_source_type: {
|
||||||
|
category: Category.EnergyPerformance,
|
||||||
|
title: "Source type",
|
||||||
|
tooltip: "Source type for street width data",
|
||||||
|
example: "",
|
||||||
|
items: commonSourceTypes
|
||||||
|
},
|
||||||
|
energy_green_roof_source_links: {
|
||||||
|
category: Category.EnergyPerformance,
|
||||||
|
title: "Source link(s)",
|
||||||
|
tooltip: "Source link(s) for street width data",
|
||||||
|
example: ["", "", ""],
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const allFieldsConfig = { ...dataFields, ...buildingUserFields };
|
export const allFieldsConfig = { ...dataFields, ...buildingUserFields };
|
@ -57,7 +57,8 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "https://github.com/colouring-cities/manual/wiki",
|
to: "https://github.com/colouring-cities/manual/wiki",
|
||||||
text: "Open Manual - Wiki",
|
text: "Colouring Cities Open Manual/Wiki",
|
||||||
|
disabled: false,
|
||||||
external: true
|
external: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -65,12 +66,6 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
|
|||||||
text: "Open code",
|
text: "Open code",
|
||||||
external: true
|
external: true
|
||||||
},
|
},
|
||||||
{
|
|
||||||
to: "https://github.com/colouring-cities/manual/wiki",
|
|
||||||
text: "Colouring Cities Open Manual/Wiki",
|
|
||||||
disabled: false,
|
|
||||||
external: true
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
to: "/showcase.html",
|
to: "/showcase.html",
|
||||||
text: "Case Study Showcase",
|
text: "Case Study Showcase",
|
||||||
@ -79,12 +74,17 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
|
|||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
to: "https://pages.colouring.london",
|
to: "https://github.com/colouring-cities/manual/wiki/A.-What-is-the-CCRP%3F",
|
||||||
text: "About",
|
text: "About the Colouring Cities Research Programme",
|
||||||
external: true
|
external: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "https://pages.colouring.london/buildingcategories",
|
to: "https://github.com/colouring-cities/manual/wiki/A2.-How-to%3F-Guides",
|
||||||
|
text: "How to Use",
|
||||||
|
external: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
to: "https://github.com/colouring-cities/manual/wiki/I.--DATA",
|
||||||
text: "Data Categories",
|
text: "Data Categories",
|
||||||
external: true
|
external: true
|
||||||
},
|
},
|
||||||
@ -94,15 +94,10 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
|
|||||||
external: true
|
external: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "https://pages.colouring.london/data-ethics",
|
to: "https://github.com/colouring-cities/manual/wiki/C.-Ethical-framework-and-ethics-policies",
|
||||||
text: "Data Ethics",
|
text: "Ethical Framework",
|
||||||
external: true
|
external: true
|
||||||
},
|
}
|
||||||
{
|
|
||||||
to: "https://pages.colouring.london/colouring-cities",
|
|
||||||
text: "Colouring Cities Research Programme",
|
|
||||||
external: true
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -110,32 +105,45 @@ function getCurrentMenuLinks(username: string): MenuLink[][] {
|
|||||||
text: "Top Contributors"
|
text: "Top Contributors"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "https://discuss.colouring.london",
|
to: config.githubURL+"/discussions",
|
||||||
text: "Discussion Forum",
|
text: "Discussion Forum",
|
||||||
external: true
|
external: true
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
to: "https://discuss.colouring.london/c/blog/9",
|
// to: "https://discuss.colouring.london/c/blog/9",
|
||||||
text: "Blog",
|
// text: "Blog",
|
||||||
external: true
|
// external: true
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
to: "/privacy-policy.html",
|
to: "https://github.com/colouring-cities/manual/wiki/C1.-Protocols,-codes-of-conduct-&-data-sharing-agreements#ccrp-contributor-privacy-statement",
|
||||||
text: "Privacy Policy"
|
text: "Privacy Policy",
|
||||||
|
external: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "/contributor-agreement.html",
|
to: "https://github.com/colouring-cities/manual/wiki/C1.-Protocols,-codes-of-conduct-&-data-sharing-agreements#ccrp-contributor--data-user-data-accuracy--ethical-use-agreement",
|
||||||
text: "Contributor Agreement"
|
text: "Contributor Agreement",
|
||||||
|
external: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "/code-of-conduct.html",
|
to: "/code-of-conduct.html",
|
||||||
text: "Code of Conduct"
|
text: "Code of Conduct"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "/data-accuracy.html",
|
to: "https://github.com/colouring-cities/manual/wiki/C1.-Protocols,-codes-of-conduct-&-data-sharing-agreements#ccrp-contributor--data-user-data-accuracy--ethical-use-agreement",
|
||||||
text: "Data Accuracy Agreement"
|
text: "Data Accuracy and Use Agreement",
|
||||||
|
external: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
to: "https://github.com/colouring-cities/manual/wiki/C1.-Protocols,-codes-of-conduct-&-data-sharing-agreements#ccrp-equality-diversity-and-inclusion-policy",
|
||||||
|
text: "Equality, Diversity and Inclusion",
|
||||||
|
external: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
to: "https://github.com/colouring-cities/manual/wiki/C1.-Protocols,-codes-of-conduct-&-data-sharing-agreements#ccrp-protocols-for-international-academic-partners",
|
||||||
|
text: "CCRP Academic Partner Protocols",
|
||||||
|
external: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
to: "/ordnance-survey-uprn.html",
|
to: "/ordnance-survey-uprn.html",
|
||||||
@ -183,7 +191,7 @@ const InternalNavLink: React.FC<{to: string; onClick: () => void}> = ({ to, onCl
|
|||||||
);
|
);
|
||||||
|
|
||||||
const ExternalNavLink: React.FC<{to: string}> = ({ to, children }) => (
|
const ExternalNavLink: React.FC<{to: string}> = ({ to, children }) => (
|
||||||
<a className="nav-link" href={to}>
|
<a className="nav-link" href={to} target="_blank">
|
||||||
{children}
|
{children}
|
||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
|
@ -4,6 +4,7 @@ COPY (SELECT
|
|||||||
ref_osm_id,
|
ref_osm_id,
|
||||||
revision_id,
|
revision_id,
|
||||||
location_name,
|
location_name,
|
||||||
|
location_name_link,
|
||||||
location_number,
|
location_number,
|
||||||
location_street,
|
location_street,
|
||||||
location_line_two,
|
location_line_two,
|
||||||
@ -13,6 +14,7 @@ COPY (SELECT
|
|||||||
location_address_links,
|
location_address_links,
|
||||||
location_latitude,
|
location_latitude,
|
||||||
location_longitude,
|
location_longitude,
|
||||||
|
location_alternative_footprint_links
|
||||||
current_landuse_group,
|
current_landuse_group,
|
||||||
current_landuse_order,
|
current_landuse_order,
|
||||||
building_attachment_form,
|
building_attachment_form,
|
||||||
|
15
migrations/041.ui_revamp_tweaks.down.sql
Normal file
15
migrations/041.ui_revamp_tweaks.down.sql
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS location_name_link;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS location_alternative_footprint_links;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS age_historical_raster_map_links;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS age_historical_vectorised_footprint_links;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS landowner_links;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS designers_links;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS builder_links;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS developer_links;
|
||||||
|
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS energy_solar;
|
||||||
|
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_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;
|
15
migrations/041.ui_revamp_tweaks.up.sql
Normal file
15
migrations/041.ui_revamp_tweaks.up.sql
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_name_link text;
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS location_alternative_footprint_links text[];
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_historical_raster_map_links text[];
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS age_historical_vectorised_footprint_links text[];
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS landowner_links text[];
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS designers_links text[];
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS builder_links text[];
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS developer_links text[];
|
||||||
|
|
||||||
|
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS energy_solar boolean;
|
||||||
|
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_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[];
|
7
migrations/042.ui_revamp_tweaks.refactor.sql
Normal file
7
migrations/042.ui_revamp_tweaks.refactor.sql
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS context_front_garden;
|
||||||
|
ALTER TABLE buildings DROP COLUMN IF EXISTS context_back_garden;
|
||||||
|
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;
|
Loading…
Reference in New Issue
Block a user