fix: bug #182 handle product group delete in tree

This commit is contained in:
puriphatt 2025-02-17 09:54:56 +07:00
parent 62aaf807eb
commit dec7bf3014

View file

@ -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 {