From ae761428ff09dc30941f1e80090209427f41be03 Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Mon, 18 Nov 2024 11:01:11 +0530 Subject: [PATCH] Reverted: removed the unnecessary changes in the getOrderDetail action(#dxp/288) --- src/store/modules/order/actions.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/store/modules/order/actions.ts b/src/store/modules/order/actions.ts index c09d7cb9..978472fe 100644 --- a/src/store/modules/order/actions.ts +++ b/src/store/modules/order/actions.ts @@ -70,22 +70,8 @@ const actions: ActionTree = { }, async getOrderDetail({ commit, state }, { orderId }) { let resp; - - const current = state.current as any - const orders = state.purchaseOrders.list as any const currentFacilityId = getCurrentFacilityId(); - if (current.length && current[0]?.orderId === orderId) { return current } - - else if(orders.length > 0) { - return orders.some((order: any) => { - if (order.doclist.docs[0]?.orderId === orderId) { - this.dispatch('product/fetchProductInformation', { order: order.doclist.docs }); - commit(types.ORDER_CURRENT_UPDATED, { ...state.current, orderId: order.doclist.docs[0]?.orderId, externalOrderId: order.doclist.docs[0]?.externalOrderId, orderStatusId: order.doclist.docs[0]?.orderStatusId, orderStatusDesc: order.doclist.docs[0]?.orderStatusDesc, items: JSON.parse(JSON.stringify(order.doclist.docs)) }) - return current; - } - }) - } try { const payload = { "json": {