diff --git a/app/components/datatable/NewField.vue b/app/components/datatable/NewField.vue index 3c478d2..a023d45 100644 --- a/app/components/datatable/NewField.vue +++ b/app/components/datatable/NewField.vue @@ -30,7 +30,7 @@ {{ v.name }} -
+
-
+

{{ invItem.category }}

- {{ invItem.sku }} + {{ invItem.stock }} {{ invItem.preorder }} {{ invItem.available }} - {{ invItem.batch }} - {{ $dayjs(invItem.expired).format("L") }} + Sản phẩm - SKU + Tồn Đặt trước Khả dụng - Batch - Hạn sử dụng + Trạng thái diff --git a/app/components/inventory/SelectedInvItem.vue b/app/components/inventory/SelectedInvItem.vue index 2eef2a6..2ef3aa1 100644 --- a/app/components/inventory/SelectedInvItem.vue +++ b/app/components/inventory/SelectedInvItem.vue @@ -89,7 +89,7 @@ const emit = defineEmits("unselect");

Vị trí lưu kho

-
+

Thông tin lô hàng

-
+

Mã lô

{{ invItem.batch }}

-
+
diff --git a/app/components/orders/OrdersKanban.vue b/app/components/orders/OrdersKanban.vue index baab935..d2427bc 100644 --- a/app/components/orders/OrdersKanban.vue +++ b/app/components/orders/OrdersKanban.vue @@ -34,7 +34,7 @@ const emit = defineEmits(["selectOrder", "unselect"]);


-
+
@@ -69,7 +69,7 @@ async function removeFromCart() {

diff --git a/app/components/pos/POS.vue b/app/components/pos/POS.vue index 956030d..f80d0b2 100644 --- a/app/components/pos/POS.vue +++ b/app/components/pos/POS.vue @@ -3,32 +3,17 @@ import Address from "~/components/pos/Address.vue"; import CartItem from "~/components/pos/CartItem.vue"; import CartTabs from "~/components/pos/CartTabs.vue"; import useActiveCart from "~/components/pos/composables/useActiveCart"; -import useCartData from "~/components/pos/composables/useCartData"; -import useCustomer from "~/components/pos/composables/useCustomer"; import useOrderInfo from "~/components/pos/composables/useOrderInfo"; import SearchBox from "~/components/SearchBox.vue"; const store = useStore(); const { $insertapi, $formatNum } = useNuxtApp(); -const { carts, cartItems, customers, getCarts, isPending } = useCartData(); +const posStore = usePosStore(); +const { carts, isPending, activeCartId, invalidCartItems, addresses, orderInfo } = storeToRefs(posStore); -const { activeCartId, activeCart, activeCartItems, customerIdsWithNoCart, subtotal, invalidCartItems } = useActiveCart({ - carts, - cartItems, - customers, -}); - -const { addresses, getAddresses, isChangingCus, changeCustomer } = useCustomer({ activeCart, getCarts }); - -const { orderInfo, isOrderValid, fullAddress, total } = useOrderInfo({ - activeCartId, - activeCart, - activeCartItems, - addresses, - getAddresses, - subtotal, -}); +const { activeCart, activeCartItems, customerIdsWithNoCart, subtotal } = useActiveCart(); +const { isOrderValid, total } = useOrderInfo(); const showModal = ref(); @@ -57,19 +42,6 @@ function openAddAddressModal() { height: "auto", }; } -provide("pos", { - carts, - activeCartId, - activeCart, - activeCartItems, - invalidCartItems, - isChangingCus, - orderInfo, - fullAddress, - getCarts, - subtotal, - total, -});