diff --git a/app/src/api/config/dataFields.ts b/app/src/api/config/dataFields.ts index 6a249cb5..8acde159 100644 --- a/app/src/api/config/dataFields.ts +++ b/app/src/api/config/dataFields.ts @@ -277,6 +277,54 @@ export const buildingAttributesConfig = valueType()({ /* eslint edit: true, verify: true, }, + construction_structural_system: { + edit: true, + verify: true, + }, + construction_structural_system_source_type: { + edit: true, + verify: true, + }, + construction_structural_system_source_links: { + edit: true, + verify: true, + }, + construction_foundation: { + edit: true, + verify: true, + }, + construction_foundation_source_type: { + edit: true, + verify: true, + }, + construction_foundation_source_links: { + edit: true, + verify: true, + }, + construction_roof_shape: { + edit: true, + verify: true, + }, + construction_roof_shape_source_type: { + edit: true, + verify: true, + }, + construction_roof_shape_source_links: { + edit: true, + verify: true, + }, + construction_irregularities: { + edit: true, + verify: true, + }, + construction_irregularities_source_type: { + edit: true, + verify: true, + }, + construction_irregularities_source_links: { + edit: true, + verify: true, + }, planning_portal_link: { edit: true, verify: true, diff --git a/app/src/frontend/building/data-containers/construction.tsx b/app/src/frontend/building/data-containers/construction.tsx index 69f709a1..962e9c23 100644 --- a/app/src/frontend/building/data-containers/construction.tsx +++ b/app/src/frontend/building/data-containers/construction.tsx @@ -1,6 +1,6 @@ import React, { Fragment } from 'react'; -import { dataFields } from '../../config/data-fields-config'; +import { commonSourceTypes, dataFields } from '../../config/data-fields-config'; import DataEntry from '../data-components/data-entry'; import SelectDataEntry from '../data-components/select-data-entry'; import withCopyEdit from '../data-container'; @@ -9,6 +9,7 @@ import Verification from '../data-components/verification'; 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'; const ConstructionMaterialsOptions = [ 'Wood', @@ -38,6 +39,199 @@ const RoofCoveringOptions = [ const ConstructionView: React.FunctionComponent = (props) => { return ( + + + + + {(props.building.construction_structural_system_source_type == commonSourceTypes[0] || + props.building.construction_structural_system_source_type == commonSourceTypes[1] || + props.building.construction_structural_system_source_type == null) ? <> : + <> + + + } +
+ + + + {(props.building.construction_foundation_source_type == commonSourceTypes[0] || + props.building.construction_foundation_source_type == commonSourceTypes[1] || + props.building.construction_foundation_source_type == null) ? <> : + <> + + + } +
+ + + + {(props.building.construction_roof_shape_source_type == commonSourceTypes[0] || + props.building.construction_roof_shape_source_type == commonSourceTypes[1] || + props.building.construction_roof_shape_source_type == null) ? <> : + <> + + + } +
+ + + + {(props.building.construction_irregularities_source_type == commonSourceTypes[0] || + props.building.construction_irregularities_source_type == commonSourceTypes[1] || + props.building.construction_irregularities_source_type == null) ? <> : + <> + + + } +
= (props) => user_verified={props.user_verified.hasOwnProperty("construction_core_material")} user_verified_as={props.user_verified.construction_core_material} verified_count={props.building.verified.construction_core_material} - /> + />