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 { interface VerificationProps {
slug: string; 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: boolean;
user_verified_as: string; user_verified_as: string;
verified_count: number; verified_count: number;
@ -24,7 +24,8 @@ class Verification extends Component<VerificationProps, any> {
e.preventDefault(); e.preventDefault();
const x = e.clientX / document.body.clientWidth; const x = e.clientX / document.body.clientWidth;
const y = e.clientY / document.body.clientHeight; 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'; mode?: 'view' | 'edit' | 'multi-edit';
onChange?: (key: string, value: any) => void; 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: boolean;
user_verified_as: string; user_verified_as: string;
verified_count: number; verified_count: number;

View File

@ -214,7 +214,7 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
this.doSubmit(edits); 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 = {}; const verifyPatch = {};
if (verify) { if (verify) {
verifyPatch[slug] = this.props.building[slug]; verifyPatch[slug] = this.props.building[slug];

View File

@ -14,7 +14,7 @@ interface CategoryViewProps {
edited: boolean; edited: boolean;
copy: CopyProps; copy: CopyProps;
onChange: (key: string, value: any) => void; 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 */ /* Special handler for adding and immediately saving a new item of an array-like attribute */
onSaveAdd: (slug: string, newItem: any) => void; 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", tooltip: "URL for current land use reference",
example: ["", "", ""], example: ["", "", ""],
}, },
current_landuse_verified: {
category: Category.LandUse,
title: 'Has this land use been manually verified?',
example: true,
},
building_attachment_form: { building_attachment_form: {
category: Category.Type, category: Category.Type,
title: "Adjacency/configuration", title: "Adjacency/configuration",