This commit is contained in:
Viet An
2026-06-15 09:47:39 +07:00
parent 2932730fc3
commit a9c37cfff5
12 changed files with 319 additions and 123 deletions

View File

@@ -4,7 +4,7 @@ const props = defineProps({
deleteable: Boolean,
});
const { $deleteapi, $numtoString, $snackbar } = useNuxtApp();
const { getCart } = inject("pos");
const { getCarts } = inject("pos");
const showConfirmModal = ref();
const isDeleting = ref(false);
@@ -25,7 +25,7 @@ async function removeFromCart() {
await $deleteapi("Cart_Item", props.cartItem.id);
isDeleting.value = false;
$snackbar("Đã xoá sản phẩm khỏi giỏ hàng", "Success");
getCart();
getCarts();
}
</script>