From 7024a6bd0a79c93859ad071ba02c4882f458fc4f Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Wed, 29 Jan 2025 17:45:43 +0530 Subject: [PATCH] Fixed: spinner not displayed when generating shipping label for transfer shipment(#901) --- src/views/TransferShipmentReview.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/views/TransferShipmentReview.vue b/src/views/TransferShipmentReview.vue index 1fc5adf0..641a66fa 100644 --- a/src/views/TransferShipmentReview.vue +++ b/src/views/TransferShipmentReview.vue @@ -21,8 +21,9 @@ {{ currentShipment.totalQuantityPicked }} {{ translate("items picked") }} - {{ currentShipment.trackingCode ? translate("Regenerate Shipping Label") : translate("Generate shipping label") }} - + + {{ currentShipment.trackingCode ? translate("Regenerate Shipping Label") : translate("Generate shipping label") }} + @@ -159,7 +160,8 @@ isShipped: false, trackingCode: '', shipmentItems: [] as any, - showLabelError: false + showLabelError: false, + isGeneratingShippingLabel: false } }, computed: { @@ -197,12 +199,12 @@ // if the request to print shipping label is not yet completed, then clicking multiple times on the button // should not do anything - if (currentShipment.isGeneratingShippingLabel) { + if (this.isGeneratingShippingLabel) { return; } await this.store.dispatch('transferorder/fetchTransferShipmentDetail', { shipmentId: this.$route.params.shipmentId }) - currentShipment.isGeneratingShippingLabel = true; + this.isGeneratingShippingLabel = true; let shippingLabelPdfUrls = this.currentShipment.shipmentPackages ?.filter((shipmentPackage: any) => shipmentPackage.labelPdfUrl) .map((shipmentPackage: any) => shipmentPackage.labelPdfUrl); @@ -232,7 +234,7 @@ await OrderService.printShippingLabel([this.currentShipment.shipmentId], shippingLabelPdfUrls) } - currentShipment.isGeneratingShippingLabel = false; + this.isGeneratingShippingLabel = false; }, async transferShipmentActionsPopover(ev: Event) { const popover = await popoverController.create({