Verify date_year
This commit is contained in:
parent
a143b76dde
commit
8f56f96779
@ -1,5 +1,6 @@
|
||||
import React, { Component, Fragment } from 'react';
|
||||
|
||||
import Verification from './verification';
|
||||
import { dataFields } from '../../data_fields';
|
||||
import { CopyProps } from '../data-containers/category-view-props';
|
||||
|
||||
@ -12,6 +13,12 @@ interface YearDataEntryProps {
|
||||
copy?: CopyProps;
|
||||
mode?: 'view' | 'edit' | 'multi-edit';
|
||||
onChange?: (key: string, value: any) => void;
|
||||
|
||||
onVerify: (slug: string, verify: boolean) => void;
|
||||
user_verified: boolean;
|
||||
user_verified_as: string;
|
||||
verified_count: number;
|
||||
allow_verify: boolean;
|
||||
}
|
||||
|
||||
class YearDataEntry extends Component<YearDataEntryProps, any> {
|
||||
@ -45,6 +52,15 @@ class YearDataEntry extends Component<YearDataEntryProps, any> {
|
||||
max={currentYear}
|
||||
// "type": "year_estimator"
|
||||
/>
|
||||
<Verification
|
||||
allow_verify={props.allow_verify}
|
||||
slug="date_year"
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified}
|
||||
user_verified_as={props.user_verified_as}
|
||||
verified_count={props.verified_count}
|
||||
/>
|
||||
|
||||
<NumericDataEntry
|
||||
title={dataFields.date_upper.title}
|
||||
slug="date_upper"
|
||||
|
@ -26,6 +26,12 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
mode={props.mode}
|
||||
copy={props.copy}
|
||||
onChange={props.onChange}
|
||||
|
||||
allow_verify={props.user !== undefined && props.building.date_year !== null}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_year")}
|
||||
user_verified_as={props.user_verified.date_year}
|
||||
verified_count={props.building.verified.date_year}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.facade_year.title}
|
||||
@ -40,8 +46,8 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
tooltip={dataFields.facade_year.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
allow_verify={props.user !== undefined}
|
||||
slug="facade_year"
|
||||
allow_verify={props.user !== undefined && props.building.facade_year !== null}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("facade_year")}
|
||||
user_verified_as={props.user_verified.facade_year}
|
||||
|
Loading…
Reference in New Issue
Block a user