From decb75c3690e08bc86f9f3709f5270a281ad248f Mon Sep 17 00:00:00 2001 From: Johnny shultz Date: Tue, 1 Apr 2025 11:39:18 -0400 Subject: [PATCH] CASH-133 CASH-133 cart cleanup --- src/fmg-components/cart/cart.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index e5d0a8645..1cc1bb484 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -207,7 +207,6 @@ export default { isNoComp: Boolean, isExpandedOnLoad: Boolean, isMSRFeeApplicable: Boolean, - donationAmount: Number, }, data() { return { @@ -1072,7 +1071,10 @@ export default { return promoCartItems; }, showDonationCartItem() { - if (this.donationAmount !== 0) { + const donationLineItem = this.lineItems.supportingItems.find( + (item) => item.partType === partTypeStrings.DONATION + ); + if (donationLineItem?.sellingPrice !== 0) { return true; } else { return false; @@ -1090,7 +1092,7 @@ export default { (item) => item.partType === partTypeStrings.DONATION ); - if (donationLineItem && donationLineItem.sellingPrice > 0) { + if (donationLineItem?.sellingPrice > 0) { return { name: this.donationCartItemName, category: cartItemCategories.SUPPORTING_ITEMS,