add verify button ref_osm_id

This commit is contained in:
Ed Chalstrey 2022-05-19 12:56:31 +01:00
parent 9febf6a21e
commit c7ff672e3b
2 changed files with 9 additions and 0 deletions

View File

@ -53,6 +53,7 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
}, },
ref_osm_id: { ref_osm_id: {
edit: true, edit: true,
verify: true,
}, },
location_name: { location_name: {
edit: false, edit: false,

View File

@ -127,6 +127,14 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
maxLength={20} maxLength={20}
onChange={props.onChange} onChange={props.onChange}
/> />
<Verification
slug="ref_osm_id"
allow_verify={props.user !== undefined && props.building.ref_osm_id !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("ref_osm_id")}
user_verified_as={props.user_verified.ref_osm_id}
verified_count={props.building.verified.ref_osm_id}
/>
<NumericDataEntry <NumericDataEntry
title={dataFields.location_latitude.title} title={dataFields.location_latitude.title}
slug="location_latitude" slug="location_latitude"