Skip to content

Commit

Permalink
Merge pull request #887 from ymaheshwari1/#886
Browse files Browse the repository at this point in the history
Fixed: shipGroup information is not being displayed for all orders(#886)
  • Loading branch information
ymaheshwari1 authored Dec 20, 2024
2 parents 69bd4d6 + c5553e0 commit 85e7c48
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/store/modules/orderLookup/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const actions: ActionTree<OrderLookupState, RootState> = {
})

if(!hasError(resp)) {
resp.data.docs.map((doc: any) => {
resp.data.docs?.map((doc: any) => {
systemProperties[doc.systemResourceId.toUpperCase()] = doc.systemPropertyValue
})
} else {
Expand Down Expand Up @@ -337,7 +337,7 @@ const actions: ActionTree<OrderLookupState, RootState> = {
const productIds: Array<string> = []
const shipmentMethodIds: Array<string> = []

const orderRouteSegmentInfo = orderRouteSegment.status === "fulfilled" && orderRouteSegment.value.data.docs.length > 0 ? orderRouteSegment.value.data.docs.reduce((orderSegmentInfo: any, routeSegment: any) => {
const orderRouteSegmentInfo = orderRouteSegment.status === "fulfilled" && orderRouteSegment.value.data.docs?.length > 0 ? orderRouteSegment.value.data.docs.reduce((orderSegmentInfo: any, routeSegment: any) => {
if(orderSegmentInfo[routeSegment.shipGroupSeqId]) orderSegmentInfo[routeSegment.shipGroupSeqId].push(routeSegment)
else orderSegmentInfo[routeSegment.shipGroupSeqId] = [routeSegment]
return orderSegmentInfo
Expand Down Expand Up @@ -374,7 +374,7 @@ const actions: ActionTree<OrderLookupState, RootState> = {
const carrierPartyIds = [] as any;

if(orderShipGroups.status === "fulfilled" && !hasError(orderShipGroups.value) && orderShipGroups.value.data.count > 0) {
shipGroups = orderShipGroups.value.data.docs.reduce((shipGroups: any, shipGroup: any) => {
shipGroups = orderShipGroups.value.data.docs?.reduce((shipGroups: any, shipGroup: any) => {
productIds.push(shipGroup.productId)
shipGroup.shipmentMethodTypeId && shipmentMethodIds.includes(shipGroup.shipmentMethodTypeId) ? '' : shipmentMethodIds.push(shipGroup.shipmentMethodTypeId)
shipGroup.shipGroupSeqId && shipGroupSeqIds.includes(shipGroup.shipGroupSeqId) ? '' : shipGroupSeqIds.push(shipGroup.shipGroupSeqId)
Expand Down

0 comments on commit 85e7c48

Please sign in to comment.