refactor date verification buttons
This commit is contained in:
parent
66c08a0da2
commit
3b5ca75eef
@ -73,6 +73,14 @@ class YearDataEntry extends Component<YearDataEntryProps, any> {
|
||||
max={currentYear}
|
||||
tooltip={dataFields.date_lower.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_lower"
|
||||
allow_verify={props.user !== undefined && props.building.date_lower !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_lower")}
|
||||
user_verified_as={props.user_verified.date_lower}
|
||||
verified_count={props.building.verified.date_lower}
|
||||
/>
|
||||
|
||||
<NumericDataEntry
|
||||
title={dataFields.date_upper.title}
|
||||
@ -85,6 +93,14 @@ class YearDataEntry extends Component<YearDataEntryProps, any> {
|
||||
min={1}
|
||||
max={currentYear}
|
||||
tooltip={dataFields.date_upper.tooltip}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_upper"
|
||||
allow_verify={props.user !== undefined && props.building.date_upper !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_upper")}
|
||||
user_verified_as={props.user_verified.date_upper}
|
||||
verified_count={props.building.verified.date_upper}
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
|
@ -36,22 +36,6 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
user_verified_as={props.user_verified.date_year}
|
||||
verified_count={props.building.verified.date_year}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_upper"
|
||||
allow_verify={props.user !== undefined && props.building.date_upper !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_upper")}
|
||||
user_verified_as={props.user_verified.date_upper}
|
||||
verified_count={props.building.verified.date_upper}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_lower"
|
||||
allow_verify={props.user !== undefined && props.building.date_lower !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_lower")}
|
||||
user_verified_as={props.user_verified.date_lower}
|
||||
verified_count={props.building.verified.date_lower}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.facade_year.title}
|
||||
slug="facade_year"
|
||||
@ -111,22 +95,6 @@ const AgeView: React.FunctionComponent<CategoryViewProps> = (props) => {
|
||||
user_verified_as={props.user_verified.date_year}
|
||||
verified_count={props.building.verified.date_year}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_upper"
|
||||
allow_verify={props.user !== undefined && props.building.date_upper !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_upper")}
|
||||
user_verified_as={props.user_verified.date_upper}
|
||||
verified_count={props.building.verified.date_upper}
|
||||
/>
|
||||
<Verification
|
||||
slug="date_lower"
|
||||
allow_verify={props.user !== undefined && props.building.date_lower !== null && !props.edited}
|
||||
onVerify={props.onVerify}
|
||||
user_verified={props.user_verified.hasOwnProperty("date_lower")}
|
||||
user_verified_as={props.user_verified.date_lower}
|
||||
verified_count={props.building.verified.date_lower}
|
||||
/>
|
||||
<NumericDataEntry
|
||||
title={dataFields.facade_year.title}
|
||||
slug="facade_year"
|
||||
|
Loading…
Reference in New Issue
Block a user