Skip to content

Commit

Permalink
Merge pull request #388 from hotwax/#347
Browse files Browse the repository at this point in the history
Improved: Fetched shipment attribute while fetching shipment detail (#347).
  • Loading branch information
ravilodhi authored Oct 11, 2024
2 parents feb753d + 062567b commit 3d12882
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/store/modules/shipment/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ const actions: ActionTree<ShipmentState, RootState> = {
const statuses = await this.dispatch('util/fetchStatus', statusIds);

const shipmentIds = shipments.map((shipment: any) => shipment.shipmentId);
const shipmentAttributes = await ShipmentService.fetchShipmentAttributes(shipmentIds)
const trackingCodes = await ShipmentService.fetchTrackingCodes(shipmentIds)

shipments.map(async (shipment: any) => {
shipment.statusDesc = statuses[shipment.statusId]
shipment.trackingIdNumber = trackingCodes?.[shipment.shipmentId];
shipment.externalOrderId = shipmentAttributes[shipment.shipmentId]?.['EXTERNAL_ORDER_ID']
shipment.externalOrderName = shipmentAttributes[shipment.shipmentId]?.['EXTERNAL_ORDER_NAME']
});

if (payload.viewIndex && payload.viewIndex > 0) shipments = state.shipments.list.concat(shipments);
Expand Down
2 changes: 1 addition & 1 deletion src/views/Shipments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default defineComponent({
"grp_op_1": "OR"
},
"entityName": "ShipmentAndTypeAndItemCount",
"fieldList" : [ "shipmentId","primaryShipGroupSeqId","partyIdFrom","partyIdTo","estimatedArrivalDate","destinationFacilityId","statusId", "shipmentItemCount", "externalId", "externalOrderId", "externalOrderName", "shipmentTypeId" ],
"fieldList" : [ "shipmentId","primaryShipGroupSeqId","partyIdFrom","partyIdTo","estimatedArrivalDate","destinationFacilityId","statusId", "shipmentItemCount", "externalId", "externalOrderId", "shipmentTypeId" ],
"noConditionFind": "Y",
"viewSize": viewSize,
"viewIndex": viewIndex,
Expand Down

0 comments on commit 3d12882

Please sign in to comment.