From 20b9ef17100fd2541b95e0a270faabc6c50ec385 Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Wed, 16 Nov 2022 19:13:32 +0530 Subject: [PATCH 1/2] Fixed: alert displaying on PO upload(#30rz7pt) --- src/views/OrderDetail.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/views/OrderDetail.vue b/src/views/OrderDetail.vue index c2320dab..a7269c2a 100644 --- a/src/views/OrderDetail.vue +++ b/src/views/OrderDetail.vue @@ -207,7 +207,8 @@ export default defineComponent({ facilities: [] as any, queryString: "", searchedProduct: {} as any, - isParentProductUpdated: false + isParentProductUpdated: false, + isPOUploaded: false } }, ionViewDidEnter(){ @@ -233,10 +234,12 @@ export default defineComponent({ }, ], }); - alert.present(); - await alert.onDidDismiss(); - - return canLeave; + if(!this.isPOUploaded){ + alert.present(); + await alert.onDidDismiss(); + this.isPOUploaded = false; + return canLeave; + } }, methods: { @@ -294,6 +297,7 @@ export default defineComponent({ fileName, params })).then(() => { + this.isPOUploaded = true; showToast(translate("The PO has been uploaded successfully"), [{ text: translate('View'), role: 'view', From 8d2dae1d2d87382f56e88b794e6e87d644a7454a Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Wed, 16 Nov 2022 19:24:12 +0530 Subject: [PATCH 2/2] Updated variable name(#30rz7pt) --- src/views/OrderDetail.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/OrderDetail.vue b/src/views/OrderDetail.vue index a7269c2a..7acbca81 100644 --- a/src/views/OrderDetail.vue +++ b/src/views/OrderDetail.vue @@ -208,7 +208,7 @@ export default defineComponent({ queryString: "", searchedProduct: {} as any, isParentProductUpdated: false, - isPOUploaded: false + isPOUploadedSuccessfully: false } }, ionViewDidEnter(){ @@ -234,10 +234,10 @@ export default defineComponent({ }, ], }); - if(!this.isPOUploaded){ + if(!this.isPOUploadedSuccessfully){ alert.present(); await alert.onDidDismiss(); - this.isPOUploaded = false; + this.isPOUploadedSuccessfully = false; return canLeave; } }, @@ -297,7 +297,7 @@ export default defineComponent({ fileName, params })).then(() => { - this.isPOUploaded = true; + this.isPOUploadedSuccessfully = true; showToast(translate("The PO has been uploaded successfully"), [{ text: translate('View'), role: 'view',