From d74bc6265c1d6dc0d6a5950c182085d5008f7269 Mon Sep 17 00:00:00 2001 From: k2maan Date: Thu, 19 Oct 2023 15:03:37 +0530 Subject: [PATCH 1/3] Improved: open orders structure for handling (#311) --- src/store/modules/order/actions.ts | 18 ++++++++++++++++++ src/views/AssignPickerModal.vue | 4 ++-- src/views/OpenOrders.vue | 26 +++++++++++++------------- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/src/store/modules/order/actions.ts b/src/store/modules/order/actions.ts index d8604487..28ca347f 100644 --- a/src/store/modules/order/actions.ts +++ b/src/store/modules/order/actions.ts @@ -347,6 +347,22 @@ const actions: ActionTree = { total = resp.data.grouped.orderId.ngroups orders = resp.data.grouped.orderId.groups this.dispatch('product/getProductInformation', { orders }) + + orders = orders.map((order: any) => { + const orderItem = order.doclist.docs[0]; + return { + customerId: orderItem.customerId, + customerName: orderItem.customerName, + orderId: orderItem.orderId, + orderDate: orderItem.orderDate, + orderName: orderItem.orderName, + groupValue: order.groupValue, + items: order.doclist.docs, + shipmentMethodTypeId: orderItem.shipmentMethodTypeId, + shipmentMethodTypeDesc: orderItem.shipmentMethodTypeDesc, + reservedDatetime: orderItem.reservedDatetime + } + }) } else { throw resp.data } @@ -486,9 +502,11 @@ const actions: ActionTree = { await dispatch('fetchInProgressOrdersAdditionalInformation', { viewIndex: payload.viewIndex}); commit(types.ORDER_INPROGRESS_QUERY_UPDATED, payload) }, + async updateCompletedOrderIndex({ commit }, payload) { commit(types.ORDER_COMPLETED_QUERY_UPDATED, payload) }, + async updateOpenOrderIndex({ commit }, payload) { commit(types.ORDER_OPEN_QUERY_UPDATED, payload) } diff --git a/src/views/AssignPickerModal.vue b/src/views/AssignPickerModal.vue index 51bbade2..3ab3cb29 100644 --- a/src/views/AssignPickerModal.vue +++ b/src/views/AssignPickerModal.vue @@ -133,10 +133,10 @@ export default defineComponent({ const orderItems = [] if(this.order) { - this.order.doclist.docs.map((item) => orderItems.push(item)) + this.order.items.map((item) => orderItems.push(item)) } else { this.openOrders.list.map((order) => { - order.doclist.docs.map((item) => orderItems.push(item)) + order.items.map((item) => orderItems.push(item)) }); } diff --git a/src/views/OpenOrders.vue b/src/views/OpenOrders.vue index fd0536ab..160b0c7f 100644 --- a/src/views/OpenOrders.vue +++ b/src/views/OpenOrders.vue @@ -35,49 +35,49 @@
{{ translate("Print Picksheet") }} - +
- {{ orders.doclist.docs[0].customerName }} -

{{ translate("Ordered") }} {{ formatUtcDate(orders.doclist.docs[0].orderDate, 'dd MMMM yyyy t a ZZZZ') }}

+ {{ order.customerName }} +

{{ translate("Ordered") }} {{ formatUtcDate(order.orderDate, 'dd MMMM yyyy t a ZZZZ') }}

- + - {{ orders.doclist.docs[0].orderName }} + {{ order.orderName }}
-
+
- +

{{ order.productSku }}

- {{ order.virtualProductName }} -

{{ getFeature(getProduct(order.productId).featureHierarchy, '1/COLOR/')}} {{ getFeature(getProduct(order.productId).featureHierarchy, '1/SIZE/')}}

+ {{ item.virtualProductName }} +

{{ getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/')}} {{ getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/')}}

From 1b4ed842a93cd14da7d3bee28efe3961c317c445 Mon Sep 17 00:00:00 2001 From: k2maan Date: Thu, 19 Oct 2023 15:06:13 +0530 Subject: [PATCH 2/3] Fixed: viewOrder method removed from UI (#311) --- src/views/OpenOrders.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/OpenOrders.vue b/src/views/OpenOrders.vue index 160b0c7f..64c74de6 100644 --- a/src/views/OpenOrders.vue +++ b/src/views/OpenOrders.vue @@ -35,7 +35,7 @@
{{ translate("Print Picksheet") }} - +
From f8a4ddb366a9e56139654a0da5fae29c0b924c36 Mon Sep 17 00:00:00 2001 From: k2maan Date: Thu, 19 Oct 2023 15:21:30 +0530 Subject: [PATCH 3/3] Fixed: typo for item in UI(#311) --- src/views/OpenOrders.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/OpenOrders.vue b/src/views/OpenOrders.vue index 64c74de6..6b2382d9 100644 --- a/src/views/OpenOrders.vue +++ b/src/views/OpenOrders.vue @@ -67,7 +67,7 @@ -

{{ order.productSku }}

+

{{ item.productSku }}

{{ item.virtualProductName }}

{{ getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/')}} {{ getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/')}}

@@ -76,7 +76,7 @@