add verification for date_link

This commit is contained in:
Ed Chalstrey 2022-05-26 14:50:04 +01:00
parent 89932d404b
commit ee6a7681a2
2 changed files with 9 additions and 0 deletions

View File

@ -105,6 +105,7 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
},
date_link: {
edit: true,
verify: true,
},
facade_year: {
edit: true,

View File

@ -170,6 +170,14 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
placeholder="https://..."
editableEntries={true}
/>
<Verification
slug="date_link"
allow_verify={props.user !== undefined && props.building.date_link !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("date_link")}
user_verified_as={props.user_verified.date_link}
verified_count={props.building.verified.date_link}
/>
</Fragment>
);
};