From debb030c08d7cf6244c4374f3ceb2c9bd76f1fbf Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 7 Jan 2025 12:03:39 +0530 Subject: [PATCH 1/2] Improved: showing loader on the screen till the carrier is getting updated (#801-bugs) --- src/views/OrderDetail.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/views/OrderDetail.vue b/src/views/OrderDetail.vue index 61c01bca..2731ee34 100644 --- a/src/views/OrderDetail.vue +++ b/src/views/OrderDetail.vue @@ -583,6 +583,7 @@ export default defineComponent({ async updateCarrierAndShippingMethod(carrierPartyId: string, shipmentMethodTypeId: string) { let resp; try { + emitter.emit("presentLoader"); this.isUpdatingCarrierDetail = true; const carrierShipmentMethods = await this.getProductStoreShipmentMethods(carrierPartyId); shipmentMethodTypeId = shipmentMethodTypeId ? shipmentMethodTypeId : carrierShipmentMethods?.[0]?.shipmentMethodTypeId; @@ -620,6 +621,7 @@ export default defineComponent({ } this.shipmentMethodTypeId = shipmentMethodTypeId + emitter.emit("dismissLoader"); showToast(translate("Shipment method detail updated successfully.")) //fetching updated shipment packages await this.store.dispatch('order/updateShipmentPackageDetail', this.order) @@ -637,6 +639,7 @@ export default defineComponent({ this.carrierPartyId = this.order.shipmentPackages?.[0].carrierPartyId; this.shipmentMethodTypeId = this.order.shipmentPackages?.[0].shipmentMethodTypeId; + emitter.emit("dismissLoader"); logger.error('Failed to update carrier and method', err); showToast(translate("Failed to update shipment method detail.")); } From ff7c09c7a35c9a538510770d3dfad377021031c4 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Tue, 7 Jan 2025 12:31:42 +0530 Subject: [PATCH 2/2] Improved: updating the carrier methods of detail page when changing carrier from the generate tracking code modal (#801) --- src/views/OrderDetail.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/OrderDetail.vue b/src/views/OrderDetail.vue index 2731ee34..36932d09 100644 --- a/src/views/OrderDetail.vue +++ b/src/views/OrderDetail.vue @@ -644,9 +644,10 @@ export default defineComponent({ showToast(translate("Failed to update shipment method detail.")); } }, - updateCarrierShipmentDetails(carrierPartyId: string, shipmentMethodTypeId: string) { + async updateCarrierShipmentDetails(carrierPartyId: string, shipmentMethodTypeId: string) { this.carrierPartyId = carrierPartyId this.shipmentMethodTypeId = shipmentMethodTypeId + this.carrierMethods = await this.getProductStoreShipmentMethods(carrierPartyId); this.shipmentLabelErrorMessages = "" }, async fetchKitComponent(orderItem: any, isOtherShipment = false ) {