feat: adjust product count on select worker

This commit is contained in:
Methapon Metanipat 2024-11-05 07:25:41 +07:00
parent 4c65515ba7
commit 7e9a033a47

View file

@ -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;
}
}