From dec7bf30140816501e84a27a73fd99cc1f32bd84 Mon Sep 17 00:00:00 2001 From: puriphatt Date: Mon, 17 Feb 2025 09:54:56 +0700 Subject: [PATCH] fix: bug #182 handle product group delete in tree --- src/pages/04_product-service/MainPage.vue | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/pages/04_product-service/MainPage.vue b/src/pages/04_product-service/MainPage.vue index 1523e5d7..3799efc9 100644 --- a/src/pages/04_product-service/MainPage.vue +++ b/src/pages/04_product-service/MainPage.vue @@ -1262,6 +1262,11 @@ async function submitService(notClose = false) { onCreateImageList.value, ); if (res) { + const group = productGroup.value?.find( + (g) => g.id === currentIdGroup.value, + ); + if (group) group.status = 'ACTIVE'; + allStat.value[1].count = allStat.value[1].count + 1; stat.value[1].count = stat.value[1].count + 1; } else { @@ -1306,6 +1311,11 @@ async function submitProduct(notClose = false) { ); if (res) { + const group = productGroup.value?.find( + (g) => g.id === currentIdGroup.value, + ); + if (group) group.status = 'ACTIVE'; + allStat.value[2].count = allStat.value[2].count + 1; stat.value[2].count = stat.value[2].count + 1; } else {