CASH-133 cart cleanup
This commit is contained in:
Johnny shultz 2025-04-01 11:39:18 -04:00
parent 383eb001df
commit decb75c369

View file

@ -207,7 +207,6 @@ export default {
isNoComp: Boolean, isNoComp: Boolean,
isExpandedOnLoad: Boolean, isExpandedOnLoad: Boolean,
isMSRFeeApplicable: Boolean, isMSRFeeApplicable: Boolean,
donationAmount: Number,
}, },
data() { data() {
return { return {
@ -1072,7 +1071,10 @@ export default {
return promoCartItems; return promoCartItems;
}, },
showDonationCartItem() { showDonationCartItem() {
if (this.donationAmount !== 0) { const donationLineItem = this.lineItems.supportingItems.find(
(item) => item.partType === partTypeStrings.DONATION
);
if (donationLineItem?.sellingPrice !== 0) {
return true; return true;
} else { } else {
return false; return false;
@ -1090,7 +1092,7 @@ export default {
(item) => item.partType === partTypeStrings.DONATION (item) => item.partType === partTypeStrings.DONATION
); );
if (donationLineItem && donationLineItem.sellingPrice > 0) { if (donationLineItem?.sellingPrice > 0) {
return { return {
name: this.donationCartItemName, name: this.donationCartItemName,
category: cartItemCategories.SUPPORTING_ITEMS, category: cartItemCategories.SUPPORTING_ITEMS,