mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 04:01:10 -04:00
Merge branch 'fix-view-alert' into 'master'
fix alert in view invoice See merge request mohit.panjvani/crater-web!15
This commit is contained in:
@ -229,12 +229,22 @@ export default {
|
|||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
async onMarkAsSent () {
|
async onMarkAsSent () {
|
||||||
this.isRequestOnGoing = true
|
swal({
|
||||||
let response = await this.markAsSent({id: this.invoice.id})
|
title: this.$t('general.are_you_sure'),
|
||||||
this.isRequestOnGoing = false
|
text: this.$t('invoices.invoice_mark_as_sent'),
|
||||||
if (response.data) {
|
icon: '/assets/icon/check-circle-solid.svg',
|
||||||
window.toastr['success'](this.$tc('invoices.marked_as_sent_message'))
|
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) {
|
async removeInvoice (id) {
|
||||||
this.selectInvoice([parseInt(id)])
|
this.selectInvoice([parseInt(id)])
|
||||||
|
|||||||
Reference in New Issue
Block a user