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

Fixed: Fetched unique carriers and their shipment methods (#883). #884

Merged
merged 1 commit into from
Dec 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
2 changes: 1 addition & 1 deletion src/components/GenerateTrackingCodeModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ion-item>
<template v-if="carrierMethods && carrierMethods.length > 0">
<ion-select :disabled="!order.missingLabelImage" :label="translate('Method')" v-model="shipmentMethodTypeId" interface="popover">
<ion-select-option v-for="method in carrierMethods" :key="method.productStoreShipMethId" :value="method.shipmentMethodTypeId">{{ translate(method.description) }}</ion-select-option>
<ion-select-option v-for="method in carrierMethods" :key="carrierMethods.partyId + method.shipmentMethodTypeId" :value="method.shipmentMethodTypeId">{{ translate(method.description) }}</ion-select-option>
</ion-select>
</template>
<template v-else>
Expand Down
10 changes: 6 additions & 4 deletions src/store/modules/carrier/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
commit(types.SHIPMENT_METHODS_UPDATED, shipmentMethods)
},

async fetchCarrierFacilities({ state, commit }, payload) {

Check warning on line 254 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'payload' is defined but never used

Check warning on line 254 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'payload' is defined but never used
let currentCarrier = JSON.parse(JSON.stringify(state.current))
let carrierFacilities = [] as any;
let viewIndex = 0, resp, docCount = 0;
Expand Down Expand Up @@ -355,7 +355,7 @@
}
},

async fetchFacilityCarriers({ state, commit }, payload) {

Check warning on line 358 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'state' is defined but never used

Check warning on line 358 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'payload' is defined but never used

Check warning on line 358 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'state' is defined but never used

Check warning on line 358 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'payload' is defined but never used
let facilityCarriers = [] as any;
let viewIndex = 0, resp, docCount = 0;

Expand All @@ -367,11 +367,12 @@
"roleTypeId": "CARRIER",
"facilityId": getCurrentFacilityId()
},
"fieldList": ["facilityId", "partyId", "firstName", "lastName", "groupName", "roleTypeId", "fromDate"],
"fieldList": ["facilityId", "partyId", "firstName", "lastName", "groupName", "roleTypeId"],
"noConditionFind": "Y",
"viewIndex": viewIndex,
"viewSize": 250,
"filterByDate": "Y"
"filterByDate": "Y",
"distinct": "Y"
}

resp = await CarrierService.fetchCarrierFacilities(params)
Expand Down Expand Up @@ -426,7 +427,7 @@

commit(types.CARRIER_FACILITY_CARRIERS_UPDATED, facilityCarriers)
},
async fetchProductStoreShipmentMeths({ state, commit }) {

Check warning on line 430 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'state' is defined but never used

Check warning on line 430 in src/store/modules/carrier/actions.ts

View workflow job for this annotation

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

'state' is defined but never used
let productStoreShipmentMethods = [] as any;
let viewIndex = 0, resp;

Expand All @@ -440,11 +441,12 @@
"shipmentMethodTypeId": "STOREPICKUP",
"shipmentMethodTypeId_op": "notEqual"
},
"fieldList": ["productStoreShipMethId", "productStoreId", "partyId", "roleTypeId", "shipmentMethodTypeId", "shipmentGatewayConfigId", "isTrackingRequired", "sequenceNumber", "description", "fromDate"],
"fieldList": ["productStoreId", "partyId", "roleTypeId", "shipmentMethodTypeId", "description"],
"noConditionFind": "Y",
"viewIndex": viewIndex,
"viewSize": 250,
"filterByDate": "Y"
"filterByDate": "Y",
"distinct": "Y"
}

resp = await CarrierService.fetchProductStoreShipmentMethods(params)
Expand Down
2 changes: 1 addition & 1 deletion src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
<ion-item>
<template v-if="carrierMethods && carrierMethods.length > 0">
<ion-select :disabled="!order.missingLabelImage" :label="translate('Method')" v-model="shipmentMethodTypeId" interface="popover" @ionChange="updateCarrierAndShippingMethod(carrierPartyId, shipmentMethodTypeId)">
<ion-select-option v-for="method in carrierMethods" :key="method.productStoreShipMethId" :value="method.shipmentMethodTypeId">{{ translate(method.description) }}</ion-select-option>
<ion-select-option v-for="method in carrierMethods" :key="method.partyId + method.shipmentMethodTypeId" :value="method.shipmentMethodTypeId">{{ translate(method.description) }}</ion-select-option>
</ion-select>
</template>
<template v-else-if="!isUpdatingCarrierDetail">
Expand Down
Loading