Decorative Features (and other tweaks)
- Add Decorative Features sub category + data - Add Source data to existing roof covering - Move existing roof covering options to the correct place - Add missed hints with links to GEM taxonomy - Add fields to Database
This commit is contained in:
parent
39a0a01d57
commit
3d6113fb0d
@ -277,6 +277,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_roof_covering_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_roof_covering_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_structural_system: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
@ -325,6 +333,22 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_decorative_features: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_decorative_feature_materials: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_decorative_feature_source_type: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
construction_decorative_feature_source_links: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
},
|
||||
planning_portal_link: {
|
||||
edit: true,
|
||||
verify: true,
|
||||
|
@ -10,6 +10,7 @@ import { CategoryViewProps } from './category-view-props';
|
||||
import InfoBox from '../../components/info-box';
|
||||
import { DataEntryGroup } from '../data-components/data-entry-group';
|
||||
import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry';
|
||||
import { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
|
||||
|
||||
const ConstructionMaterialsOptions = [
|
||||
'Wood',
|
||||
@ -22,17 +23,6 @@ const ConstructionMaterialsOptions = [
|
||||
'Other Man-Made Material'
|
||||
];
|
||||
|
||||
const RoofCoveringOptions = [
|
||||
'Slate',
|
||||
'Clay Tile',
|
||||
'Wood',
|
||||
'Asphalt',
|
||||
'Iron or Steel',
|
||||
'Other Metal',
|
||||
'Other Natural Material',
|
||||
'Other Man-Made Material'
|
||||
];
|
||||
|
||||
/**
|
||||
* Construction view/edit section
|
||||
*/
|
||||
@ -251,23 +241,13 @@ const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) =>
|
||||
user_verified_as={props.user_verified.construction_core_material}
|
||||
verified_count={props.building.verified.construction_core_material}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_secondary_materials.title}
|
||||
disabled={true}
|
||||
slug="construction_secondary_materials"
|
||||
value={props.building.construction_secondary_materials}
|
||||
tooltip={dataFields.construction_secondary_materials.tooltip}
|
||||
options={ConstructionMaterialsOptions}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<hr/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_roof_covering.title}
|
||||
slug="construction_roof_covering"
|
||||
value={props.building.construction_roof_covering}
|
||||
tooltip={dataFields.construction_roof_covering.tooltip}
|
||||
options={RoofCoveringOptions}
|
||||
options={dataFields.construction_roof_covering.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
@ -279,15 +259,106 @@ const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) =>
|
||||
user_verified={props.user_verified.hasOwnProperty("construction_roof_covering")}
|
||||
user_verified_as={props.user_verified.construction_roof_covering}
|
||||
verified_count={props.building.verified.construction_roof_covering}
|
||||
/>
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Construction sectors">
|
||||
<DataEntry
|
||||
title="Construction system type"
|
||||
slug=""
|
||||
value=""
|
||||
mode='view'
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_roof_covering_source_type.title}
|
||||
slug="construction_roof_covering_source_type"
|
||||
value={props.building.construction_roof_covering_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.construction_roof_covering_source_type.tooltip}
|
||||
placeholder={dataFields.construction_roof_covering_source_type.example}
|
||||
options={dataFields.construction_roof_covering_source_type.items}
|
||||
/>
|
||||
{(props.building.construction_roof_covering_source_type == commonSourceTypes[0] ||
|
||||
props.building.construction_roof_covering_source_type == commonSourceTypes[1] ||
|
||||
props.building.construction_roof_covering_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.construction_roof_covering_source_links.title}
|
||||
slug="construction_roof_covering_source_links"
|
||||
value={props.building.construction_roof_covering_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.construction_roof_covering_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
<DataEntryGroup name="Decorative features">
|
||||
<LogicalDataEntry
|
||||
slug='construction_decorative_features'
|
||||
title={dataFields.construction_decorative_features.title}
|
||||
value={props.building.construction_decorative_features}
|
||||
onChange={props.onSaveChange}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
/>
|
||||
<Verification
|
||||
slug="construction_decorative_features"
|
||||
allow_verify={props.user !== undefined && props.building.construction_decorative_features !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("construction_decorative_features")}
|
||||
user_verified_as={props.user_verified.construction_decorative_features}
|
||||
verified_count={props.building.verified.construction_decorative_features}
|
||||
/>
|
||||
{
|
||||
props.building.construction_decorative_features &&
|
||||
<>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_decorative_feature_materials.title}
|
||||
slug="construction_decorative_feature_materials"
|
||||
value={props.building.construction_decorative_feature_materials}
|
||||
tooltip={dataFields.construction_decorative_feature_materials.tooltip}
|
||||
options={dataFields.construction_decorative_feature_materials.items}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
/>
|
||||
<Verification
|
||||
slug="construction_decorative_feature_materials"
|
||||
allow_verify={props.user !== undefined && props.building.construction_decorative_feature_materials !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("construction_decorative_feature_materials")}
|
||||
user_verified_as={props.user_verified.construction_decorative_feature_materials}
|
||||
verified_count={props.building.verified.construction_decorative_feature_materials}
|
||||
/>
|
||||
<SelectDataEntry
|
||||
title={dataFields.construction_decorative_feature_source_type.title}
|
||||
slug="construction_decorative_feature_source_type"
|
||||
value={props.building.construction_decorative_feature_source_type}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.construction_decorative_feature_source_type.tooltip}
|
||||
placeholder={dataFields.construction_decorative_feature_source_type.example}
|
||||
options={dataFields.construction_decorative_feature_source_type.items}
|
||||
/>
|
||||
{(props.building.construction_decorative_feature_source_type == commonSourceTypes[0] ||
|
||||
props.building.construction_decorative_feature_source_type == commonSourceTypes[1] ||
|
||||
props.building.construction_decorative_feature_source_type == null) ? <></> :
|
||||
<>
|
||||
<MultiDataEntry
|
||||
title={dataFields.construction_decorative_feature_source_links.title}
|
||||
slug="construction_decorative_feature_source_links"
|
||||
value={props.building.construction_decorative_feature_source_links}
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
tooltip={dataFields.construction_decorative_feature_source_links.tooltip}
|
||||
placeholder="https://..."
|
||||
editableEntries={true}
|
||||
isUrl={true}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
</>
|
||||
}
|
||||
</DataEntryGroup>
|
||||
</Fragment>
|
||||
);
|
||||
|
@ -601,14 +601,37 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
|
||||
construction_roof_covering: {
|
||||
category: Category.Construction,
|
||||
title: "Main roof covering",
|
||||
tooltip: 'Main roof covering material',
|
||||
title: "What is the main roof covering?",
|
||||
tooltip: '',
|
||||
example: "",
|
||||
items: [
|
||||
'Slate',
|
||||
'Clay Tile',
|
||||
'Wood',
|
||||
'Asphalt',
|
||||
'Iron or Steel',
|
||||
'Other Metal',
|
||||
'Other Natural Material',
|
||||
'Other Man-Made Material'
|
||||
]
|
||||
},
|
||||
construction_roof_covering_source_type: {
|
||||
category: Category.Construction,
|
||||
title: "Source type",
|
||||
tooltip: "Source of roof covering data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
construction_roof_covering_source_links: {
|
||||
category: Category.Construction,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for roof covering data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
construction_structural_system: {
|
||||
category: Category.Construction,
|
||||
title: "What type of structural system does the building appear to have?",
|
||||
tooltip: "",
|
||||
tooltip: "Refer to GEM Taxonomy [<a href='https://github.com/gem/gem_taxonomy'>LINK</a>]",
|
||||
example: "Solid masonry walls supporting the roof",
|
||||
items: [
|
||||
"Solid masonry walls supporting the roof",
|
||||
@ -632,7 +655,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
construction_foundation: {
|
||||
category: Category.Construction,
|
||||
title: "What is the foundation system thought to be",
|
||||
tooltip: "",
|
||||
tooltip: "Refer to GEM Taxonomy [<a href='https://taxonomy.openquake.org/terms/foundation-system'>LINK</a>]",
|
||||
example: "Deep Foundations with lateral support",
|
||||
items: [
|
||||
"Shallow foundations with no lateral support",
|
||||
@ -658,7 +681,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
construction_roof_shape: {
|
||||
category: Category.Construction,
|
||||
title: "What kind of roof shape does the building have?",
|
||||
tooltip: "",
|
||||
tooltip: "Refer to GEM Taxonomy [<a href='https://taxonomy.openquake.org/terms/roof-shape'>LINK</a>]",
|
||||
example: "Pitched with gable ends",
|
||||
items: [
|
||||
"What kind of roof shape does the building have?",
|
||||
@ -689,7 +712,7 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
construction_irregularities: {
|
||||
category: Category.Construction,
|
||||
title: "Are there any structural irregularities in the shape of the building?",
|
||||
tooltip: "i.e. Is one side higher than other?",
|
||||
tooltip: "i.e. Is one side higher than other? - Refer to GEM Taxonomy [<a href='https://github.com/gem/gem_taxonomy'>LINK</a>]",
|
||||
example: "No irregularities",
|
||||
items: [
|
||||
"Vertical irregularities",
|
||||
@ -710,6 +733,39 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
|
||||
tooltip: "URL(s) for irregularity data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
construction_decorative_features: {
|
||||
category: Category.Construction,
|
||||
title: "Are there decorative features/mouldings integrated into the facade ?",
|
||||
example: true,
|
||||
tooltip: "",
|
||||
},
|
||||
construction_decorative_feature_materials: {
|
||||
category: Category.Construction,
|
||||
title: "What are these decorative features mainly made of?",
|
||||
tooltip: "",
|
||||
example: "Concrete",
|
||||
items: [
|
||||
"Wood",
|
||||
"Clay",
|
||||
"Concrete",
|
||||
"Glass",
|
||||
"Metal",
|
||||
"Other"
|
||||
]
|
||||
},
|
||||
construction_decorative_feature_source_type: {
|
||||
category: Category.Construction,
|
||||
title: "Source type",
|
||||
tooltip: "Source of roof shape data",
|
||||
example: "",
|
||||
items: commonSourceTypes
|
||||
},
|
||||
construction_decorative_feature_source_links: {
|
||||
category: Category.Construction,
|
||||
title: "Source links",
|
||||
tooltip: "URL(s) for roof shape data source(s)",
|
||||
example: ["", "", ""],
|
||||
},
|
||||
|
||||
sust_breeam_rating: {
|
||||
category: Category.EnergyPerformance,
|
||||
|
@ -14,4 +14,10 @@ ALTER TABLE buildings DROP COLUMN IF EXISTS construction_irregularities;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_irregularities_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_irregularities_source_links;
|
||||
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_roof_covering_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_roof_covering_source_links;
|
||||
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_features;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_feature_materials;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_feature_source_type;
|
||||
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_feature_source_links;
|
||||
|
@ -14,3 +14,10 @@ ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_irregularities text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_irregularities_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_irregularities_source_links text[];
|
||||
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_roof_covering_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_roof_covering_source_links text[];
|
||||
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_features boolean;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_feature_materials text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_feature_source_type text;
|
||||
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_feature_source_links text[];
|
Loading…
Reference in New Issue
Block a user