Skip to content

Commit

Permalink
Merge pull request #825 from amansinghbais/#777
Browse files Browse the repository at this point in the history
Fixed: tracking url not coming on the order lookup page (#777)
  • Loading branch information
ravilodhi authored Oct 16, 2024
2 parents b41d446 + 019d291 commit a296417
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/OrderLookupLabelActionsPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ion-content>
<ion-list>
<ion-list-header>{{ currentOrder.shipGroups[shipGroupSeqId][0]?.trackingIdNumber }}</ion-list-header>
<ion-item button :disabled="getCarriersTrackingInfo(carrierPartyId)?.trackingUrl" @click="redirectToTrackingUrl()">
<ion-item button :disabled="!getCarriersTrackingInfo(carrierPartyId)?.trackingUrl" @click="redirectToTrackingUrl()">
{{ getCarriersTrackingInfo(carrierPartyId)?.carrierName ? getCarriersTrackingInfo(carrierPartyId).carrierName : carrierPartyId }}
<ion-icon slot="end" :icon="openOutline" />
</ion-item>
Expand Down Expand Up @@ -61,7 +61,7 @@ export default defineComponent({
},

redirectToTrackingUrl() {
const trackingUrl = this.getCarriersTrackingInfo(this.carrierPartyId)
const trackingUrl = this.getCarriersTrackingInfo(this.carrierPartyId)?.trackingUrl
const trackingCode = this.currentOrder.shipGroups[this.shipGroupSeqId][0]?.trackingIdNumber
window.open(trackingUrl.replace("${trackingNumber}", trackingCode), "_blank");
popoverController.dismiss()
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/orderLookup/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const actions: ActionTree<OrderLookupState, RootState> = {
carrierPartyIds.map((partyId: any) => {
carriersTrackingInfo[partyId] = {
carrierName: store.getters["util/getPartyName"](partyId),
trackingUrl: systemProperties[partyId.toUpperCase()]?.trackingUrl ? systemProperties[partyId.toUpperCase()].trackingUrl : ""
trackingUrl: systemProperties[partyId.toUpperCase()] ? systemProperties[partyId.toUpperCase()] : ""
}
})

Expand Down

0 comments on commit a296417

Please sign in to comment.