handleVerify does same as handleSaveChange

This commit is contained in:
Ed Chalstrey 2022-05-19 15:38:32 +01:00
parent d809f22573
commit b8d9c12a1b

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];
@ -246,7 +246,11 @@ const withCopyEdit: (wc: React.ComponentType<CategoryViewProps>) => DataContaine
} catch(err) {
this.setState({error: err});
}
const edits = {};
const edits = {
[slug]: value
};
this.doSubmit(edits);
console.log(slug + " verify button clicked")
}