This commit is contained in:
Viet An
2026-06-29 17:23:48 +07:00
parent 34dd0413f3
commit 8b3da71895
7 changed files with 58 additions and 8 deletions

View File

@@ -27,5 +27,10 @@ export default function useActiveCart({ carts, cartItems, customers }) {
return activeCartItems.value?.reduce((prev, curr) => prev + curr.imei__variant__price, 0);
});
return { activeCartId, activeCart, activeCartItems, customerIdsWithNoCart, subtotal };
const invalidCartItems = ref([]);
watch(activeCartId, () => {
invalidCartItems.value = [];
});
return { activeCartId, activeCart, activeCartItems, customerIdsWithNoCart, subtotal, invalidCartItems };
}