Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: Added support to search by external order name shipment attribute on shipments screen. #348

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/store/modules/shipment/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,10 @@
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.externalOrderId = shipmentAttributes[shipment.shipmentId]?.['EXTERNAL_ORDER_ID']
shipment.externalOrderName = shipmentAttributes[shipment.shipmentId]?.['EXTERNAL_ORDER_NAME']
shipment.trackingIdNumber = trackingCodes?.[shipment.shipmentId];
});

Expand Down Expand Up @@ -94,7 +91,7 @@
receiveShipmentItem ({ commit }, payload) {
return Promise.all(payload.items.map(async (item: any) => {
const params = {
shipmentId: payload.shipmentId,

Check warning on line 94 in src/store/modules/shipment/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

'commit' is defined but never used

Check warning on line 94 in src/store/modules/shipment/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

'commit' is defined but never used
facilityId: this.state.user.currentFacility.facilityId,
shipmentItemSeqId: item.itemSeqId,
productId: item.productId,
Expand Down
6 changes: 5 additions & 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", "shipmentTypeId" ],
"fieldList" : [ "shipmentId","primaryShipGroupSeqId","partyIdFrom","partyIdTo","estimatedArrivalDate","destinationFacilityId","statusId", "shipmentItemCount", "externalId", "externalOrderId", "externalOrderName", "shipmentTypeId" ],
"noConditionFind": "Y",
"viewSize": viewSize,
"viewIndex": viewIndex,
Expand All @@ -129,6 +129,10 @@ export default defineComponent({
payload.inputFields["externalOrderId_op"] = 'contains'
payload.inputFields["externalOrderId_ic"] = 'Y'
payload.inputFields["externalOrderId_grp"] = '2'
payload.inputFields["externalOrderName_value"] = this.queryString
payload.inputFields["externalOrderName_op"] = 'contains'
payload.inputFields["externalOrderName_ic"] = 'Y'
payload.inputFields["externalOrderName_grp"] = '2'
payload.inputFields["grp_op_2"] = 'OR'
}
await this.store.dispatch("shipment/findShipment", payload);
Expand Down
Loading