From 68a51e08fe496a6fa996aea9175150970614345a Mon Sep 17 00:00:00 2001 From: Yash Maheshwari Date: Mon, 30 Oct 2023 16:00:46 +0530 Subject: [PATCH] Improved: condition for bulk ship button on completed page(#281) --- src/views/Completed.vue | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/views/Completed.vue b/src/views/Completed.vue index 436c19ca..0a271738 100644 --- a/src/views/Completed.vue +++ b/src/views/Completed.vue @@ -41,7 +41,7 @@
- {{ translate("Ship") }} + {{ translate("Ship") }}
@@ -125,7 +125,7 @@
- + @@ -626,11 +626,12 @@ export default defineComponent({ this.store.dispatch('stock/fetchStock', { productId }) }, isTrackingRequiredForAnyShipmentPackage(order: any) { - if (!order.shipmentPackages) { - return false - } - - return order.shipmentPackages.some((shipmentPackage: any) => shipmentPackage.isTrackingRequired === 'Y') + return order.shipmentPackages?.some((shipmentPackage: any) => shipmentPackage.isTrackingRequired === 'Y') + }, + hasAnyShipmentTrackingInfoMissing() { + return this.completedOrders.list.some((order: any) => { + return (order.shipmentPackages && order.shipmentPackages.some((shipmentPackage: any) => shipmentPackage.isTrackingRequired === 'Y')) && order.missingLabelImage; + }) } }, setup() {