mirror of
				https://github.com/crater-invoice/crater.git
				synced 2025-10-28 04:01:10 -04:00 
			
		
		
		
	bug: notification issues solved
This commit is contained in:
		| @ -377,13 +377,13 @@ export default { | ||||
|         if (result.value) { | ||||
|           let res = await this.deleteEstimate({ ids: [this.id] }) | ||||
|           if (res.data.success) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('estimates.deleted_message', 1), | ||||
|             }) | ||||
|             this.refreshEstTable() | ||||
|           } else if (res.data.error) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: res.data.message, | ||||
|             }) | ||||
| @ -428,13 +428,13 @@ export default { | ||||
|           this.selectAllField = false | ||||
|  | ||||
|           if (res.data) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$t('estimates.conversion_message'), | ||||
|             }) | ||||
|             this.$router.push(`invoices/${res.data.invoice.id}/edit`) | ||||
|           } else if (res.data.error) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: res.data.message, | ||||
|             }) | ||||
| @ -477,7 +477,7 @@ export default { | ||||
|           this.refreshEstTable() | ||||
|  | ||||
|           if (response.data) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('estimates.mark_as_sent_successfully'), | ||||
|             }) | ||||
| @ -502,13 +502,13 @@ export default { | ||||
|         if (result.value) { | ||||
|           let res = await this.deleteInvoice({ ids: [this.id] }) | ||||
|           if (res.data.success) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('invoices.deleted_message'), | ||||
|             }) | ||||
|             this.refreshInvTable() | ||||
|           } else if (res.data.error) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: res.data.message, | ||||
|             }) | ||||
| @ -549,7 +549,7 @@ export default { | ||||
|           this.refreshInvTable() | ||||
|  | ||||
|           if (response.data.success) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('invoices.send_invoice_successfully'), | ||||
|             }) | ||||
| @ -557,13 +557,13 @@ export default { | ||||
|           } | ||||
|  | ||||
|           if (response.data.error === 'user_email_does_not_exist') { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: this.$tc('invoices.user_email_does_not_exist'), | ||||
|             }) | ||||
|             return false | ||||
|           } | ||||
|           this.showToaster({ | ||||
|           this.showNotification({ | ||||
|             type: 'error', | ||||
|             message: this.$tc('invoices.something_went_wrong'), | ||||
|           }) | ||||
| @ -604,7 +604,7 @@ export default { | ||||
|  | ||||
|           this.refreshInvTable() | ||||
|           if (response.data) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('invoices.mark_as_sent_successfully'), | ||||
|             }) | ||||
| @ -646,7 +646,7 @@ export default { | ||||
|  | ||||
|           if (response.data) { | ||||
|             this.refreshEstTable() | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('estimates.marked_as_accepted_message'), | ||||
|             }) | ||||
| @ -688,7 +688,7 @@ export default { | ||||
|  | ||||
|           if (response.data) { | ||||
|             this.refreshEstTable() | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('estimates.marked_as_rejected_message'), | ||||
|             }) | ||||
| @ -730,7 +730,7 @@ export default { | ||||
|           this.refreshEstTable() | ||||
|  | ||||
|           if (response.data.success) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('estimates.send_estimate_successfully'), | ||||
|             }) | ||||
| @ -738,13 +738,13 @@ export default { | ||||
|           } | ||||
|  | ||||
|           if (response.data.error === 'user_email_does_not_exist') { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: this.$tc('estimates.user_email_does_not_exist'), | ||||
|             }) | ||||
|             return true | ||||
|           } | ||||
|           this.showToaster({ | ||||
|           this.showNotification({ | ||||
|             type: 'error', | ||||
|             message: this.$tc('estimates.something_went_wrong'), | ||||
|           }) | ||||
|  | ||||
| @ -422,7 +422,7 @@ export default { | ||||
|           this.isMarkAsSent = false | ||||
|           if (response.data) { | ||||
|             this.estimate.status = 'SENT' | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('estimates.mark_as_sent_successfully'), | ||||
|             }) | ||||
| @ -461,13 +461,13 @@ export default { | ||||
|         if (result.value) { | ||||
|           let request = await this.deleteEstimate({ ids: [id] }) | ||||
|           if (request.data.success) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('estimates.deleted_message', 1), | ||||
|             }) | ||||
|             this.$router.push('/admin/estimates') | ||||
|           } else if (request.data.error) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: request.data.message, | ||||
|             }) | ||||
|  | ||||
| @ -426,7 +426,7 @@ export default { | ||||
|           this.isMarkingAsSent = false | ||||
|           if (response.data) { | ||||
|             this.invoice.status = 'SENT' | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('invoices.marked_as_sent_message'), | ||||
|             }) | ||||
| @ -465,13 +465,13 @@ export default { | ||||
|         if (result.value) { | ||||
|           let request = await this.deleteInvoice({ ids: [id] }) | ||||
|           if (request.data.success) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('invoices.deleted_message', 1), | ||||
|             }) | ||||
|             this.$router.push('/admin/invoices') | ||||
|           } else if (request.data.error) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: request.data.message, | ||||
|             }) | ||||
|  | ||||
| @ -385,13 +385,13 @@ export default { | ||||
|         if (result.value) { | ||||
|           let request = await this.deletePayment({ ids: [id] }) | ||||
|           if (request.data.success) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'success', | ||||
|               message: this.$tc('payments.deleted_message', 1), | ||||
|             }) | ||||
|             this.$router.push('/admin/payments') | ||||
|           } else if (request.data.error) { | ||||
|             this.showToaster({ | ||||
|             this.showNotification({ | ||||
|               type: 'error', | ||||
|               message: request.data.message, | ||||
|             }) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user