add more verification buttons

This commit is contained in:
Ed Chalstrey 2022-05-19 12:58:54 +01:00
parent c7ff672e3b
commit 7ac1ab66a8
2 changed files with 18 additions and 0 deletions

View File

@ -78,9 +78,11 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
},
location_latitude: {
edit: true,
verify: true,
},
location_longitude: {
edit: true,
verify: true,
},
date_year: {
edit: true,

View File

@ -147,6 +147,14 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
placeholder="Latitude, e.g. 51.5467"
onChange={props.onChange}
/>
<Verification
slug="location_latitude"
allow_verify={props.user !== undefined && props.building.location_latitude !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("location_latitude")}
user_verified_as={props.user_verified.location_latitude}
verified_count={props.building.verified.location_latitude}
/>
<NumericDataEntry
title={dataFields.location_longitude.title}
slug="location_longitude"
@ -159,6 +167,14 @@ const LocationView: React.FunctionComponent<CategoryViewProps> = (props) => (
placeholder="Longitude, e.g. -0.0586"
onChange={props.onChange}
/>
<Verification
slug="location_longitude"
allow_verify={props.user !== undefined && props.building.location_longitude !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("location_longitude")}
user_verified_as={props.user_verified.location_longitude}
verified_count={props.building.verified.location_longitude}
/>
</Fragment>
);
const LocationContainer = withCopyEdit(LocationView);