Revert "remove changes related to Current Use verification button"

This reverts commit ed5cd0b9fa.
This commit is contained in:
Ed Chalstrey 2022-05-26 15:33:38 +01:00
parent a5259fed35
commit 1d9b3bef13
5 changed files with 11 additions and 6 deletions

View File

@ -5,7 +5,7 @@ import './verification.css';
interface VerificationProps {
slug: string;
onVerify: (slug: string, verify: boolean, x: number, y: number) => void;
onVerify: (slug: string, verify: boolean, x: number, y: number, value: any) => void;
user_verified: boolean;
user_verified_as: string;
verified_count: number;
@ -24,7 +24,8 @@ class Verification extends Component<VerificationProps, any> {
e.preventDefault();
const x = e.clientX / document.body.clientWidth;
const y = e.clientY / document.body.clientHeight;
this.props.onVerify(this.props.slug, verify, x, y);
const value = null;
this.props.onVerify(this.props.slug, verify, x, y, value);
}
}

View File

@ -14,7 +14,7 @@ interface YearDataEntryProps {
mode?: 'view' | 'edit' | 'multi-edit';
onChange?: (key: string, value: any) => void;
onVerify: (slug: string, verify: boolean, x: number, y: number) => void;
onVerify: (slug: string, verify: boolean, x: number, y: number, value: any) => void;
user_verified: boolean;
user_verified_as: string;
verified_count: number;

View File

@ -214,7 +214,7 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
this.doSubmit(edits);
}
async handleVerify(slug: string, verify: boolean, x: number, y: number) {
async handleVerify(slug: string, verify: boolean, x: number, y: number, value: any) {
const verifyPatch = {};
if (verify) {
verifyPatch[slug] = this.props.building[slug];

View File

@ -14,7 +14,7 @@ interface CategoryViewProps {
edited: boolean;
copy: CopyProps;
onChange: (key: string, value: any) => void;
onVerify: (slug: string, verify: boolean, x: number, y: number) => void;
onVerify: (slug: string, verify: boolean, x: number, y: number, value: any) => void;
/* Special handler for adding and immediately saving a new item of an array-like attribute */
onSaveAdd: (slug: string, newItem: any) => void;

View File

@ -220,7 +220,11 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
tooltip: "URL for current land use reference",
example: ["", "", ""],
},
current_landuse_verified: {
category: Category.LandUse,
title: 'Has this land use been manually verified?',
example: true,
},
building_attachment_form: {
category: Category.Type,
title: "Adjacency/configuration",