From 14cea467a8f51733604fd9a928073503c08a6cfa Mon Sep 17 00:00:00 2001 From: Tiago Vasconcelos Date: Fri, 17 Mar 2023 10:25:46 +0000 Subject: [PATCH] fix: q-notify behaviour --- .../components/customer-stall/customer-stall.html | 7 +------ .../components/customer-stall/customer-stall.js | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/static/components/customer-stall/customer-stall.html b/static/components/customer-stall/customer-stall.html index ea37b72..53995ba 100644 --- a/static/components/customer-stall/customer-stall.html +++ b/static/components/customer-stall/customer-stall.html @@ -235,12 +235,7 @@ @click="copyText(qrCodeDialog.data.payment_request)" >Copy invoice - Close diff --git a/static/components/customer-stall/customer-stall.js b/static/components/customer-stall/customer-stall.js index 7fb51c6..0b0bddb 100644 --- a/static/components/customer-stall/customer-stall.js +++ b/static/components/customer-stall/customer-stall.js @@ -190,9 +190,20 @@ async function customerStall(path) { } } }, + openQrCodeDialog() { + this.qrCodeDialog = { + data: { + payment_request: null + }, + dismissMsg: null, + show: false + } + }, closeQrCodeDialog() { this.qrCodeDialog.show = false - this.qrCodeDialog.dismissMsg = null + setTimeout(() => { + this.qrCodeDialog.dismissMsg() + }, 1000) }, async placeOrder() { this.loading = true @@ -281,7 +292,7 @@ async function customerStall(path) { } this.loading = false this.resetCart() - this.qrCodeDialog.show = true + this.openQrCodeDialog() this.listenMessages() }, async listenMessages() {