From bb5b200d303032f95f5378a2e31671223db5f9e7 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Wed, 2 Apr 2025 09:54:34 -0400 Subject: [PATCH 1/2] More cleanup --- src/fmg-components/cart/cart.vue | 18 +++++++++--------- src/layouts/confirmation/confirmation.vue | 4 +--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 1cc1bb484..a4a0e0243 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -401,11 +401,15 @@ export default { if (!this.lineItems || this.lineItems.length < 1) { return []; } + let supportingItemsToAdd = []; + if (this.lineItems.supportingItems) { + supportingItemsToAdd = this.lineItems.supportingItems.filter( + (item) => item.partType !== partTypeStrings.DONATION + ) + } return [ ...(this.lineItems.glassParts ?? []), - ...(this.lineItems.supportingItems.filter( - (item) => item.partType !== partTypeStrings.DONATION - ) ?? []), + ...supportingItemsToAdd, ...(this.availableVaps ?? []), ]; }, @@ -1074,11 +1078,7 @@ export default { const donationLineItem = this.lineItems.supportingItems.find( (item) => item.partType === partTypeStrings.DONATION ); - if (donationLineItem?.sellingPrice !== 0) { - return true; - } else { - return false; - } + return !!donationLineItem; }, donationCartItemName() { return this.getCmsContent("DonationCartTextWidget", "Text"); @@ -1092,7 +1092,7 @@ export default { (item) => item.partType === partTypeStrings.DONATION ); - if (donationLineItem?.sellingPrice > 0) { + if (donationLineItem) { return { name: this.donationCartItemName, category: cartItemCategories.SUPPORTING_ITEMS, diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index 12415226b..8e49f298d 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -63,9 +63,7 @@ :isExpandedOnLoad="false" :isItac="isItac" :isNoComp="isNoComp" - :isMSRFeeApplicable="isMSRFeeApplicable" - :donationAmount="donationAmount" - @update-donation-amount="updateDonationAmount" /> + :isMSRFeeApplicable="isMSRFeeApplicable" />
Date: Wed, 2 Apr 2025 10:04:44 -0400 Subject: [PATCH 2/2] Formatting --- src/fmg-components/cart/cart.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index a4a0e0243..2a715bc93 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -405,7 +405,7 @@ export default { if (this.lineItems.supportingItems) { supportingItemsToAdd = this.lineItems.supportingItems.filter( (item) => item.partType !== partTypeStrings.DONATION - ) + ); } return [ ...(this.lineItems.glassParts ?? []),