From 5aeac185ea385861b5796aebdc1e185c926ff879 Mon Sep 17 00:00:00 2001 From: satyaprakash10 Date: Wed, 13 Nov 2019 16:51:58 +0530 Subject: [PATCH] fix alert in view invoice --- resources/assets/js/views/invoices/View.vue | 22 +++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/resources/assets/js/views/invoices/View.vue b/resources/assets/js/views/invoices/View.vue index a14d2373..fd1ce809 100644 --- a/resources/assets/js/views/invoices/View.vue +++ b/resources/assets/js/views/invoices/View.vue @@ -229,12 +229,22 @@ export default { return true }, async onMarkAsSent () { - this.isRequestOnGoing = true - let response = await this.markAsSent({id: this.invoice.id}) - this.isRequestOnGoing = false - if (response.data) { - window.toastr['success'](this.$tc('invoices.marked_as_sent_message')) - } + swal({ + title: this.$t('general.are_you_sure'), + text: this.$t('invoices.invoice_mark_as_sent'), + icon: '/assets/icon/check-circle-solid.svg', + buttons: true, + dangerMode: true + }).then(async (MarkAsSend_Invoice) => { + if (MarkAsSend_Invoice) { + this.isRequestOnGoing = true + let response = await this.markAsSent({id: this.invoice.id}) + this.isRequestOnGoing = false + if (response.data) { + window.toastr['success'](this.$tc('invoices.marked_as_sent_message')) + } + } + }) }, async removeInvoice (id) { this.selectInvoice([parseInt(id)])