From 7e9a033a47742505534cb481bdd0feac9da0af2a Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Tue, 5 Nov 2024 07:25:41 +0700 Subject: [PATCH] feat: adjust product count on select worker --- src/components/05_quotation/ProductItem.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/05_quotation/ProductItem.vue b/src/components/05_quotation/ProductItem.vue index aa48269a..aae67bfa 100644 --- a/src/components/05_quotation/ProductItem.vue +++ b/src/components/05_quotation/ProductItem.vue @@ -196,9 +196,11 @@ function handleCheck( ) { const target = data.workerIndex.indexOf(index); if (target > -1) { + data.amount -= 1; data.workerIndex.splice(target, 1); } else { data.workerIndex.push(index); + data.amount += 1; } }