From d9785573661cf171c5f21ed4055776c72a222f1d Mon Sep 17 00:00:00 2001 From: Yash Date: Wed, 1 Dec 2021 18:35:13 +0530 Subject: [PATCH 1/2] fix --- .../components/dropdowns/RecurringInvoiceIndexDropdown.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/scripts/components/dropdowns/RecurringInvoiceIndexDropdown.vue b/resources/scripts/components/dropdowns/RecurringInvoiceIndexDropdown.vue index 4f162f0dc..8fdb09ddd 100644 --- a/resources/scripts/components/dropdowns/RecurringInvoiceIndexDropdown.vue +++ b/resources/scripts/components/dropdowns/RecurringInvoiceIndexDropdown.vue @@ -109,7 +109,7 @@ async function removeMultipleRecurringInvoices(id = null) { .deleteMultipleRecurringInvoices(id) .then((res) => { if (res.data.success) { - // refreshTable() + props.table && props.table.refresh() recurringInvoiceStore.$patch((state) => { state.selectedRecurringInvoices = [] state.selectAllField = false From d839962292b858392dac6a9d6e45e83581c03e14 Mon Sep 17 00:00:00 2001 From: yashkanakiya Date: Wed, 1 Dec 2021 13:52:12 +0000 Subject: [PATCH 2/2] Fix mark as accepted not updating state --- resources/scripts/stores/estimate.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/resources/scripts/stores/estimate.js b/resources/scripts/stores/estimate.js index a373bbe38..7b09b41a5 100644 --- a/resources/scripts/stores/estimate.js +++ b/resources/scripts/stores/estimate.js @@ -278,12 +278,19 @@ export const useEstimateStore = (useWindow = false) => { axios .post(`/api/v1/estimates/${data.id}/status`, data) .then((response) => { - const notificationStore = useNotificationStore() + let pos = this.estimates.findIndex( + (estimate) => estimate.id === data.id + ) + if (this.estimates[pos]) { + this.estimates[pos].status = 'ACCEPTED' - notificationStore.showNotification({ - type: 'success', - message: global.t('estimates.marked_as_accepted_message'), - }) + const notificationStore = useNotificationStore() + + notificationStore.showNotification({ + type: 'success', + message: global.t('estimates.marked_as_accepted_message'), + }) + } resolve(response) }) .catch((err) => {