Skip to content

Commit

Permalink
Improved: refetching order detail on cancel whole shipGroup and added…
Browse files Browse the repository at this point in the history
… check for request cancellation item while get order (hotwax#92)
  • Loading branch information
amansinghbais committed Dec 2, 2024
1 parent 7c9bfd3 commit e32f0a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/Order.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
})
Expand Down Expand Up @@ -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()
}
}
],
Expand Down

0 comments on commit e32f0a6

Please sign in to comment.