From e32f0a670503fcffa220b5760ba24a6288fc5e90 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Mon, 2 Dec 2024 10:51:30 +0530 Subject: [PATCH] Improved: refetching order detail on cancel whole shipGroup and added check for request cancellation item while get order (#92) --- src/views/Order.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/views/Order.vue b/src/views/Order.vue index 0e8f0cd0..3a0a6ea7 100644 --- a/src/views/Order.vue +++ b/src/views/Order.vue @@ -330,7 +330,7 @@ export default defineComponent({ if(group.facilityId === 'PICKUP_REJECTED' && group.shipmentMethodTypeId === "STOREPICKUP") { group.selectedShipmentMethodTypeId = group.shipmentMethodTypeId; group.items = group.items.filter((item: any) => { - if(item.status == 'ITEM_CANCELLED') return false; + if(item.status == "ITEM_CANCELLED" || item.status === "ITEM_REQ_CANCELATN") return false; productIds.add(item.productId); return true; }) @@ -582,6 +582,7 @@ export default defineComponent({ // Todo: handle case for the request cancellation const isCancelled = await this.cancelShipGroup(shipGroup, []); showToast(translate(isCancelled ? "Order cancelled successfully." : "Failed to cancel the order.")) + this.getOrder() } } ],