2019-08-14 17:34:47 -04:00
|
|
|
import React, { Fragment } from 'react';
|
2019-08-14 14:33:26 -04:00
|
|
|
|
2021-02-22 01:59:24 -05:00
|
|
|
import { dataFields } from '../../config/data-fields-config';
|
2021-02-24 22:22:25 -05:00
|
|
|
import DataEntry from '../data-components/data-entry';
|
2020-04-01 07:18:19 -04:00
|
|
|
import SelectDataEntry from '../data-components/select-data-entry';
|
2019-08-14 16:54:00 -04:00
|
|
|
import withCopyEdit from '../data-container';
|
2019-08-14 14:33:26 -04:00
|
|
|
|
2020-04-01 07:18:19 -04:00
|
|
|
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'
|
|
|
|
];
|
|
|
|
|
2019-08-14 14:33:26 -04:00
|
|
|
/**
|
|
|
|
* Construction view/edit section
|
|
|
|
*/
|
2020-04-01 07:18:19 -04:00
|
|
|
const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
|
|
|
return (
|
|
|
|
<Fragment>
|
|
|
|
<SelectDataEntry
|
|
|
|
title={dataFields.construction_core_material.title}
|
|
|
|
slug="construction_core_material"
|
2020-05-04 09:24:53 -04:00
|
|
|
value={props.building.construction_core_material}
|
2020-04-01 07:18:19 -04:00
|
|
|
tooltip={dataFields.construction_core_material.tooltip}
|
|
|
|
options={ConstructionMaterialsOptions}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
|
|
|
/>
|
|
|
|
<SelectDataEntry
|
|
|
|
title={dataFields.construction_secondary_materials.title}
|
2020-05-04 09:24:53 -04:00
|
|
|
disabled={true}
|
2020-04-01 07:18:19 -04:00
|
|
|
slug="construction_secondary_materials"
|
2020-05-04 09:24:53 -04:00
|
|
|
value={props.building.construction_secondary_materials}
|
2020-04-01 07:18:19 -04:00
|
|
|
tooltip={dataFields.construction_secondary_materials.tooltip}
|
|
|
|
options={ConstructionMaterialsOptions}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
|
|
|
/>
|
|
|
|
<SelectDataEntry
|
|
|
|
title={dataFields.construction_roof_covering.title}
|
|
|
|
slug="construction_roof_covering"
|
2020-05-04 09:24:53 -04:00
|
|
|
value={props.building.construction_roof_covering}
|
2020-04-01 07:18:19 -04:00
|
|
|
tooltip={dataFields.construction_roof_covering.tooltip}
|
|
|
|
options={RoofCoveringOptions}
|
|
|
|
mode={props.mode}
|
|
|
|
copy={props.copy}
|
|
|
|
onChange={props.onChange}
|
|
|
|
/>
|
2021-02-24 22:22:25 -05:00
|
|
|
<DataEntry
|
2022-02-02 05:26:06 -05:00
|
|
|
title="Construction system type"
|
2021-02-24 22:22:25 -05:00
|
|
|
slug=""
|
|
|
|
value=""
|
|
|
|
mode='view'
|
|
|
|
/>
|
2020-04-01 07:18:19 -04:00
|
|
|
</Fragment>
|
|
|
|
);
|
2020-05-04 09:24:53 -04:00
|
|
|
};
|
2020-04-01 07:18:19 -04:00
|
|
|
|
2019-08-14 14:33:26 -04:00
|
|
|
const ConstructionContainer = withCopyEdit(ConstructionView);
|
|
|
|
|
|
|
|
export default ConstructionContainer;
|