Modify files for adding construction attributes
This commit is contained in:
parent
315c028c6a
commit
e503ee4dcc
@ -379,6 +379,9 @@ const BUILDING_FIELD_WHITELIST = new Set([
|
|||||||
'size_floor_area_ground',
|
'size_floor_area_ground',
|
||||||
'size_floor_area_total',
|
'size_floor_area_total',
|
||||||
'size_width_frontage',
|
'size_width_frontage',
|
||||||
|
'construction_core_material',
|
||||||
|
'construction_secondary_materials',
|
||||||
|
'construction_roof_covering',
|
||||||
'planning_portal_link',
|
'planning_portal_link',
|
||||||
'planning_in_conservation_area',
|
'planning_in_conservation_area',
|
||||||
'planning_conservation_area_name',
|
'planning_conservation_area_name',
|
||||||
|
@ -74,9 +74,8 @@ const BuildingView: React.FunctionComponent<BuildingViewProps> = (props) => {
|
|||||||
return <ConstructionContainer
|
return <ConstructionContainer
|
||||||
{...props}
|
{...props}
|
||||||
title="Construction"
|
title="Construction"
|
||||||
intro="How are buildings built? Coming soon…"
|
intro="How are buildings built?"
|
||||||
help="https://pages.colouring.london/construction"
|
help="https://pages.colouring.london/construction"
|
||||||
inactive={true}
|
|
||||||
/>;
|
/>;
|
||||||
case 'team':
|
case 'team':
|
||||||
return <TeamContainer
|
return <TeamContainer
|
||||||
|
@ -60,7 +60,7 @@ const Categories: React.FC<CategoriesProps> = (props) => (
|
|||||||
desc="Methods & materials"
|
desc="Methods & materials"
|
||||||
slug="construction"
|
slug="construction"
|
||||||
help="https://pages.colouring.london/construction"
|
help="https://pages.colouring.london/construction"
|
||||||
inactive={true}
|
inactive={false}
|
||||||
mode={props.mode}
|
mode={props.mode}
|
||||||
building_id={props.building_id}
|
building_id={props.building_id}
|
||||||
/>
|
/>
|
||||||
|
@ -1,55 +1,74 @@
|
|||||||
import React, { Fragment } from 'react';
|
import React, { Fragment } from 'react';
|
||||||
|
|
||||||
|
import { dataFields } from '../../data_fields';
|
||||||
|
import DataEntry from '../data-components/data-entry';
|
||||||
|
import SelectDataEntry from '../data-components/select-data-entry';
|
||||||
import withCopyEdit from '../data-container';
|
import withCopyEdit from '../data-container';
|
||||||
|
|
||||||
|
import { CategoryViewProps } from './category-view-props';
|
||||||
|
|
||||||
|
const ConstructionMaterialsOptions = [
|
||||||
|
'Wood',
|
||||||
|
'Stone',
|
||||||
|
'Brick',
|
||||||
|
'Steel',
|
||||||
|
'Reinforced Concrete',
|
||||||
|
'Other Metal',
|
||||||
|
'Other Natural Material',
|
||||||
|
'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
|
* Construction view/edit section
|
||||||
*/
|
*/
|
||||||
const ConstructionView = (props) => (
|
const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||||
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<p className="data-intro">{props.intro}</p>
|
<SelectDataEntry
|
||||||
<ul>
|
title={dataFields.construction_core_material.title}
|
||||||
<li>Construction system</li>
|
slug="construction_core_material"
|
||||||
{
|
value={props.building.construction_core_material} // check
|
||||||
// "disabled": true,
|
tooltip={dataFields.construction_core_material.tooltip}
|
||||||
// "slug": "construction_system",
|
options={ConstructionMaterialsOptions}
|
||||||
// "type": "text"
|
mode={props.mode}
|
||||||
}
|
copy={props.copy}
|
||||||
<li>Primary materials</li>
|
onChange={props.onChange}
|
||||||
{
|
/>
|
||||||
// "disabled": true,
|
<SelectDataEntry
|
||||||
// "slug": "construction_primary_material",
|
title={dataFields.construction_secondary_materials.title}
|
||||||
// "type": "text"
|
slug="construction_secondary_materials"
|
||||||
}
|
value={props.building.construction_secondary_materials} // check
|
||||||
<li>Secondary materials</li>
|
tooltip={dataFields.construction_secondary_materials.tooltip}
|
||||||
{
|
options={ConstructionMaterialsOptions}
|
||||||
// "disabled": true,
|
mode={props.mode}
|
||||||
// "slug": "construction_secondary_material",
|
copy={props.copy}
|
||||||
// "type": "text"
|
onChange={props.onChange}
|
||||||
}
|
/>
|
||||||
<li>Roofing material</li>
|
<SelectDataEntry
|
||||||
{
|
title={dataFields.construction_roof_covering.title}
|
||||||
// "disabled": true,
|
slug="construction_roof_covering"
|
||||||
// "slug": "construction_roofing_material",
|
value={props.building.construction_roof_covering} // check
|
||||||
// "type": "text"
|
tooltip={dataFields.construction_roof_covering.tooltip}
|
||||||
}
|
options={RoofCoveringOptions}
|
||||||
<li>Percentage of facade glazed</li>
|
mode={props.mode}
|
||||||
{
|
copy={props.copy}
|
||||||
// "disabled": true,
|
onChange={props.onChange}
|
||||||
// "slug": "construction_facade_percentage_glazed",
|
/>
|
||||||
// "type": "number",
|
|
||||||
// "step": 5
|
|
||||||
}
|
|
||||||
<li>BIM reference or link</li>
|
|
||||||
{
|
|
||||||
// "disabled": true,
|
|
||||||
// "slug": "construction_bim_reference",
|
|
||||||
// "type": "text",
|
|
||||||
// "placeholder": "https://..."
|
|
||||||
}
|
|
||||||
</ul>
|
|
||||||
</Fragment>
|
</Fragment>
|
||||||
);
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const ConstructionContainer = withCopyEdit(ConstructionView);
|
const ConstructionContainer = withCopyEdit(ConstructionView);
|
||||||
|
|
||||||
export default ConstructionContainer;
|
export default ConstructionContainer;
|
||||||
|
@ -282,6 +282,24 @@ export const dataFields = {
|
|||||||
//tooltip: ,
|
//tooltip: ,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
construction_core_material: {
|
||||||
|
category: Category.Construction,
|
||||||
|
title: "Core Material",
|
||||||
|
tooltip:"The main structural material",
|
||||||
|
},
|
||||||
|
|
||||||
|
construction_secondary_materials: {
|
||||||
|
category: Category.Construction,
|
||||||
|
title: "Secondary Construction Material/s",
|
||||||
|
tooltip:"Other construction materials",
|
||||||
|
},
|
||||||
|
|
||||||
|
construction_roof_covering: {
|
||||||
|
category: Category.Construction,
|
||||||
|
title: "Main Roof Covering",
|
||||||
|
tooltip:'Main roof covering material',
|
||||||
|
},
|
||||||
|
|
||||||
sust_breeam_rating: {
|
sust_breeam_rating: {
|
||||||
category: Category.Sustainability,
|
category: Category.Sustainability,
|
||||||
title: "BREEAM Rating",
|
title: "BREEAM Rating",
|
||||||
|
@ -64,6 +64,9 @@ This is the main table, containing almost all data collected by Colouring London
|
|||||||
- `size_floor_area_ground`: ground floor floor area in square metres
|
- `size_floor_area_ground`: ground floor floor area in square metres
|
||||||
- `size_floor_area_total`: total floor area in square metres
|
- `size_floor_area_total`: total floor area in square metres
|
||||||
- `size_width_frontage`: width of frontage in metres
|
- `size_width_frontage`: width of frontage in metres
|
||||||
|
- `construction_core_material`: main structural material
|
||||||
|
- `construction_secondary_materials`: other structural materials
|
||||||
|
- `construction_roof_covering`: main roof covering
|
||||||
- `sust_breeam_rating`: BREEAM rating
|
- `sust_breeam_rating`: BREEAM rating
|
||||||
- `sust_dec`: DEC rating
|
- `sust_dec`: DEC rating
|
||||||
- `sust_retrofit_date`: year of last significant retrofit
|
- `sust_retrofit_date`: year of last significant retrofit
|
||||||
|
@ -37,6 +37,9 @@ COPY (SELECT
|
|||||||
sust_breeam_rating,
|
sust_breeam_rating,
|
||||||
sust_dec,
|
sust_dec,
|
||||||
sust_retrofit_date,
|
sust_retrofit_date,
|
||||||
|
construction_core_material,
|
||||||
|
construction_secondary_materials,
|
||||||
|
construction_roof_covering,
|
||||||
planning_portal_link,
|
planning_portal_link,
|
||||||
planning_in_conservation_area,
|
planning_in_conservation_area,
|
||||||
planning_conservation_area_name,
|
planning_conservation_area_name,
|
||||||
|
Loading…
Reference in New Issue
Block a user