mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-30 21:21:09 -04:00 
			
		
		
		
	made some changes and removed changes of vue-multi-select
This commit is contained in:
		| @ -396,7 +396,7 @@ export default { | ||||
|       swal({ | ||||
|         title: this.$t('general.are_you_sure'), | ||||
|         text: this.$tc('estimates.confirm_delete', 1), | ||||
|         icon: 'error', | ||||
|         icon: '/assets/icon/trash-solid.svg', | ||||
|         buttons: true, | ||||
|         dangerMode: true | ||||
|       }).then(async (willDelete) => { | ||||
| @ -416,7 +416,7 @@ export default { | ||||
|       swal({ | ||||
|         title: this.$t('general.are_you_sure'), | ||||
|         text: this.$t('estimates.confirm_conversion'), | ||||
|         icon: 'error', | ||||
|         icon: '/assets/icon/envelope-solid.svg', | ||||
|         buttons: true, | ||||
|         dangerMode: true | ||||
|       }).then(async (willDelete) => { | ||||
| @ -433,14 +433,24 @@ export default { | ||||
|       }) | ||||
|     }, | ||||
|     async onMarkAsSent (id) { | ||||
|       const data = { | ||||
|         id: id | ||||
|       } | ||||
|       let response = await this.markAsSent(data) | ||||
|       this.$refs.table.refresh() | ||||
|       if (response.data) { | ||||
|         window.toastr['success'](this.$tc('estimates.mark_as_sent')) | ||||
|       } | ||||
|       swal({ | ||||
|         title: this.$t('general.are_you_sure'), | ||||
|         text: this.$t('estimates.confirm_mark_as_sent'), | ||||
|         icon: '/assets/icon/check-circle-solid.svg', | ||||
|         buttons: true, | ||||
|         dangerMode: true | ||||
|       }).then(async (willMarkAsSent) => { | ||||
|         if (willMarkAsSent) { | ||||
|           const data = { | ||||
|             id: id | ||||
|           } | ||||
|           let response = await this.markAsSent(data) | ||||
|           this.$refs.table.refresh() | ||||
|           if (response.data) { | ||||
|             window.toastr['success'](this.$tc('estimates.mark_as_sent_successfully')) | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|  | ||||
|     async removeInvoice (id) { | ||||
| @ -448,7 +458,7 @@ export default { | ||||
|       swal({ | ||||
|         title: this.$t('general.are_you_sure'), | ||||
|         text: this.$tc('invoices.confirm_delete'), | ||||
|         icon: 'error', | ||||
|         icon: '/assets/icon/trash-solid.svg', | ||||
|         buttons: true, | ||||
|         dangerMode: true | ||||
|       }).then(async (willDelete) => { | ||||
| @ -465,24 +475,44 @@ export default { | ||||
|     }, | ||||
|  | ||||
|     async sendInvoice (id) { | ||||
|       const data = { | ||||
|         id: id | ||||
|       } | ||||
|       let response = await this.sendEmail(data) | ||||
|       this.$refs.table.refresh() | ||||
|       if (response.data) { | ||||
|         window.toastr['success'](this.$tc('invoices.send_invoice')) | ||||
|       } | ||||
|       swal({ | ||||
|         title: this.$t('general.are_you_sure'), | ||||
|         text: this.$t('invoices.confirm_send'), | ||||
|         icon: '/assets/icon/paper-plane-solid.svg', | ||||
|         buttons: true, | ||||
|         dangerMode: true | ||||
|       }).then(async (willSendInvoice) => { | ||||
|         if (willSendInvoice) { | ||||
|           const data = { | ||||
|             id: id | ||||
|           } | ||||
|           let response = await this.sendEmail(data) | ||||
|           this.$refs.table.refresh() | ||||
|           if (response.data) { | ||||
|             window.toastr['success'](this.$tc('invoices.send_invoice_successfully')) | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|     async sentInvoice (id) { | ||||
|       const data = { | ||||
|         id: id | ||||
|       } | ||||
|       let response = await this.markAsSent(data) | ||||
|       this.$refs.table.refresh() | ||||
|       if (response.data) { | ||||
|         window.toastr['success'](this.$tc('invoices.mark_as_sent')) | ||||
|       } | ||||
|       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 (willMarkAsSend) => { | ||||
|         if (willMarkAsSend) { | ||||
|           const data = { | ||||
|             id: id | ||||
|           } | ||||
|           let response = await this.markAsSent(data) | ||||
|           this.$refs.table.refresh() | ||||
|           if (response.data) { | ||||
|             window.toastr['success'](this.$tc('invoices.mark_as_sent_successfully')) | ||||
|           } | ||||
|         } | ||||
|       }) | ||||
|     } | ||||
|  | ||||
|   } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user