From 4da4d841452637982f4494d0c856e80beb826ae9 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Thu, 27 Jun 2024 14:08:59 +0200 Subject: [PATCH] NTR: fix order items (#776) Co-authored-by: Vitalij Mik --- .../sw-order/component/sw-order-line-items-grid/index.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js index f5c41291d..5a7f11b6b 100644 --- a/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js +++ b/src/Resources/app/administration/src/module/mollie-payments/extension/sw-order/component/sw-order-line-items-grid/index.js @@ -355,6 +355,11 @@ Component.override('sw-order-line-items-grid', { return itemStatus.quantityCanceled; }, isCancelable(item){ + + if(this.cancelStatus === undefined || this.cancelStatus === null){ + return false; + } + const itemStatus = this.cancelStatus[item.id]; if(itemStatus === undefined || itemStatus === null){ return false; @@ -364,6 +369,9 @@ Component.override('sw-order-line-items-grid', { }, getCancelData(item){ + if(this.cancelStatus === undefined || this.cancelStatus === null){ + return {}; + } const itemStatus = this.cancelStatus[item.id]; if(itemStatus === undefined){ return {};