From 16ac85f31c6a24c1a9b6d68097fd47e73c3aec85 Mon Sep 17 00:00:00 2001 From: Ravi Lodhi Date: Wed, 11 Dec 2024 15:14:07 +0530 Subject: [PATCH] Fixed: If the shipment has labelImageUrl set then always open it in new tab (#873). --- src/components/OrderLookupLabelActionsPopover.vue | 4 +--- src/services/UtilService.ts | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/OrderLookupLabelActionsPopover.vue b/src/components/OrderLookupLabelActionsPopover.vue index 42795b1f..01bd8e6b 100644 --- a/src/components/OrderLookupLabelActionsPopover.vue +++ b/src/components/OrderLookupLabelActionsPopover.vue @@ -28,7 +28,6 @@ import { documentOutline, openOutline } from "ionicons/icons"; import { translate } from "@hotwax/dxp-components"; import { mapGetters, useStore } from "vuex"; import { OrderService } from '@/services/OrderService'; -import { isPdf } from '@/utils' export default defineComponent({ name: "OrderLookupLabelActionsPopover", @@ -53,7 +52,7 @@ export default defineComponent({ shipmentPackages.map((shipmentPackage: any) => { shipmentIds.push(shipmentPackage.shipmentId) - this.isPdf(shipmentPackage.labelImageUrl) && shippingLabelPdfUrls.push(shipmentPackage.labelImageUrl) + shippingLabelPdfUrls.push(shipmentPackage.labelImageUrl) }) await OrderService.printShippingLabel(shipmentIds, shippingLabelPdfUrls) @@ -72,7 +71,6 @@ export default defineComponent({ return { documentOutline, - isPdf, openOutline, store, translate diff --git a/src/services/UtilService.ts b/src/services/UtilService.ts index 9fd09992..3e606da1 100644 --- a/src/services/UtilService.ts +++ b/src/services/UtilService.ts @@ -1,7 +1,6 @@ import { api, hasError } from '@/adapter'; import logger from '@/logger'; import store from '@/store'; -import { isPdf } from '@/utils'; const fetchShipmentMethods = async (query: any): Promise => { return api({ @@ -106,7 +105,7 @@ const findShipmentPackages = async(shipmentIds: Array): Promise => shipmentPackage.labelImageUrl = "" shipmentPackage.internationalInvoiceUrl = "" } - if (shipmentPackage.labelImageUrl && isPdf(shipmentPackage.labelImageUrl)) { + if (shipmentPackage.labelImageUrl) { shipmentPackage.labelPdfUrl = shipmentPackage.labelImageUrl; } if(shipmentForOrders[key]) {