changes
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
export default function usePlaceOrder({
|
||||
activeCart,
|
||||
activeCartItems,
|
||||
invalidCartItems,
|
||||
orderInfo,
|
||||
fullAddress,
|
||||
subtotal,
|
||||
total,
|
||||
getCarts,
|
||||
onSuccess,
|
||||
}) {
|
||||
import useActiveCart from "~/components/pos/composables/useActiveCart";
|
||||
import useOrderInfo from "~/components/pos/composables/useOrderInfo";
|
||||
|
||||
export default function usePlaceOrder({ onSuccess }) {
|
||||
const { $dayjs, $id, $getdata, $insertapi, $patchapi, $deleteapi, $snackbar } = useNuxtApp();
|
||||
|
||||
const posStore = usePosStore();
|
||||
const { invalidCartItems, orderInfo } = storeToRefs(posStore);
|
||||
const { activeCart, activeCartItems, subtotal } = useActiveCart();
|
||||
const { fullAddress, total } = useOrderInfo();
|
||||
|
||||
const isPending = ref(false);
|
||||
const paidPaymentStatus = ref();
|
||||
const invoice = ref();
|
||||
@@ -206,7 +205,7 @@ export default function usePlaceOrder({
|
||||
customer: null,
|
||||
}),
|
||||
]);
|
||||
getCarts();
|
||||
posStore.getCarts();
|
||||
}
|
||||
|
||||
async function placeOrder() {
|
||||
|
||||
Reference in New Issue
Block a user