changes
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
<script setup>
|
||||
const { carts, activeCartId, activeCartItems, isChangingCus, getCarts } = inject("pos");
|
||||
import useActiveCart from "~/components/pos/composables/useActiveCart";
|
||||
|
||||
const posStore = usePosStore();
|
||||
const { carts, activeCartId, isChangingCus } = storeToRefs(posStore);
|
||||
const { activeCartItems } = useActiveCart();
|
||||
|
||||
const { $insertapi, $deleteapi } = useNuxtApp();
|
||||
const isAddingCart = ref(false);
|
||||
@@ -9,7 +13,7 @@ async function addCart() {
|
||||
const newCart = await $insertapi("Cart", { notify: false });
|
||||
activeCartId.value = newCart.id;
|
||||
isAddingCart.value = false;
|
||||
getCarts();
|
||||
posStore.getCarts();
|
||||
}
|
||||
|
||||
const isDeletingCart = ref();
|
||||
@@ -36,7 +40,7 @@ async function removeCart(cartId) {
|
||||
}
|
||||
}
|
||||
}
|
||||
getCarts();
|
||||
posStore.getCarts();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user