From 853219c1a20331f6eceedb41b814f9ce74170c4c Mon Sep 17 00:00:00 2001 From: Net <93821485+somnetsak123@users.noreply.github.com> Date: Fri, 28 Jun 2024 15:51:13 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20=E0=B9=81=E0=B8=81=E0=B9=89=20=E0=B8=A5?= =?UTF-8?q?=E0=B8=9A=E0=B8=82=E0=B9=89=E0=B8=AD=E0=B9=84=E0=B8=A1=E0=B9=88?= =?UTF-8?q?=E0=B8=AB=E0=B8=B2=E0=B8=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/04_product-service/MainPage.vue | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index aad2a78e..a17b5467 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -547,7 +547,12 @@ async function deleteServiceById(serviceId?: string) { action: async () => { const res = await deleteService(serviceId ?? currentIdService.value); - await fetchListOfService(); + if (productAndServiceTab.value === 'service') { + await await fetchListOfService(); + } + if (productAndServiceTab.value === 'all') { + await fetchListOfProductAndService(); + } dialogServiceEdit.value = false; @@ -571,7 +576,13 @@ async function deleteTypeOfProduct(id?: string) { message: t('deleteConfirmMessage'), action: async () => { const res = await deleteProduct(id ?? currentIdProduct.value); - await fetchListOfProduct(currentIdType.value); + + if (productAndServiceTab.value === 'product') { + await fetchListOfProduct(currentIdType.value); + } + if (productAndServiceTab.value === 'all') { + await fetchListOfProductAndService(); + } dialogProductEdit.value = false;