From 4a3980fd140f3ac20665d13b69fa90c4a8912b54 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Wed, 1 May 2019 23:32:03 +0000 Subject: [PATCH] --- ayanova/src/api/gzform.js | 7 +++---- ayanova/src/views/inventory-widget-edit.vue | 22 ++++++++++----------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/ayanova/src/api/gzform.js b/ayanova/src/api/gzform.js index 2472dbbc..434926ae 100644 --- a/ayanova/src/api/gzform.js +++ b/ayanova/src/api/gzform.js @@ -503,11 +503,10 @@ export default { } }); }, - async confirm(vm) { - const res = await vm.$dialog.confirm({ - text: "Do you really want to exit?", + confirm(vm) { + return vm.$dialog.confirm({ + text: "GZFORM has a question: Do you really want to exit?", title: "Warning" }); - return res; } }; diff --git a/ayanova/src/views/inventory-widget-edit.vue b/ayanova/src/views/inventory-widget-edit.vue index fb3a4469..18707989 100644 --- a/ayanova/src/views/inventory-widget-edit.vue +++ b/ayanova/src/views/inventory-widget-edit.vue @@ -431,21 +431,21 @@ export default { }, duplicate() { console.log("About to dialog"); - - - this.$dialog.confirm({ - text: "Do you really want to exit?", - title: "Warning" - }).then(res => { - console.log("The dialog result is:"); - console.log(res); - }); + this.$gzform.confirm(this).then(res => { + console.log("The dialog result is:"); + console.log(res); + }); + // this.$dialog.confirm({ + // text: "Do you really want to exit?", + // title: "Warning" + // }).then(res => { + // console.log("The dialog result is:"); + // console.log(res); + // }); //console.log(this.$gzform.confirm(this)); - - // this.$dialog.error({ // text: "Cannot delete this item", // title: "Error"