From 1ffb1b2eec9b600010d484ff24b0cb6c904fcddd Mon Sep 17 00:00:00 2001 From: Aman-RM Date: Mon, 12 Apr 2021 16:02:44 +0530 Subject: [PATCH] bug: notification issues solved --- .../js/views/dashboard/DashboardTable.vue | 32 +++++++++---------- resources/assets/js/views/estimates/View.vue | 6 ++-- resources/assets/js/views/invoices/View.vue | 6 ++-- resources/assets/js/views/payments/View.vue | 4 +-- 4 files changed, 24 insertions(+), 24 deletions(-) diff --git a/resources/assets/js/views/dashboard/DashboardTable.vue b/resources/assets/js/views/dashboard/DashboardTable.vue index e62a5c1f..de37dc34 100644 --- a/resources/assets/js/views/dashboard/DashboardTable.vue +++ b/resources/assets/js/views/dashboard/DashboardTable.vue @@ -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'), }) diff --git a/resources/assets/js/views/estimates/View.vue b/resources/assets/js/views/estimates/View.vue index 00bf1a6f..d765e5ee 100644 --- a/resources/assets/js/views/estimates/View.vue +++ b/resources/assets/js/views/estimates/View.vue @@ -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, }) diff --git a/resources/assets/js/views/invoices/View.vue b/resources/assets/js/views/invoices/View.vue index ef1d3eb5..edbbaa3b 100644 --- a/resources/assets/js/views/invoices/View.vue +++ b/resources/assets/js/views/invoices/View.vue @@ -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, }) diff --git a/resources/assets/js/views/payments/View.vue b/resources/assets/js/views/payments/View.vue index 7a295853..080bce8b 100644 --- a/resources/assets/js/views/payments/View.vue +++ b/resources/assets/js/views/payments/View.vue @@ -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, })