add verification buttons construction

This commit is contained in:
Ed Chalstrey 2022-05-19 13:04:53 +01:00
parent 7ac1ab66a8
commit 3ba9d0b5ef
2 changed files with 18 additions and 0 deletions

View File

@ -151,12 +151,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
},
construction_core_material: {
edit: true,
verify: true,
},
construction_secondary_materials: {
edit: false,
},
construction_roof_covering: {
edit: true,
verify: true,
},
planning_portal_link: {
edit: true,

View File

@ -45,6 +45,14 @@ const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) =>
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_core_material"
allow_verify={props.user !== undefined && props.building.construction_core_material !== null && !props.edited}
onVerify={props.onVerify}
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}
/>
<SelectDataEntry
title={dataFields.construction_secondary_materials.title}
disabled={true}
@ -66,6 +74,14 @@ const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) =>
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_roof_covering"
allow_verify={props.user !== undefined && props.building.construction_roof_covering !== null && !props.edited}
onVerify={props.onVerify}
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}
/>
<DataEntry
title="Construction system type"
slug=""