diff --git a/src/store/modules/order/actions.ts b/src/store/modules/order/actions.ts index cb923260..baaeaf7a 100644 --- a/src/store/modules/order/actions.ts +++ b/src/store/modules/order/actions.ts @@ -71,20 +71,6 @@ const actions: ActionTree<OrderState, RootState> = { async getOrderDetail({ commit, state }, { orderId }) { let resp; - const current = state.current as any - const orders = state.purchaseOrders.list as any - - 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": {