More cleanup

This commit is contained in:
Scott Kiener 2025-04-02 09:54:34 -04:00
parent 1cd30deb49
commit bb5b200d30
2 changed files with 10 additions and 12 deletions

View file

@ -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,

View file

@ -63,9 +63,7 @@
:isExpandedOnLoad="false"
:isItac="isItac"
:isNoComp="isNoComp"
:isMSRFeeApplicable="isMSRFeeApplicable"
:donationAmount="donationAmount"
@update-donation-amount="updateDonationAmount" />
:isMSRFeeApplicable="isMSRFeeApplicable" />
<div class="mt-3" v-if="DisplayFosterLove">
<donationBlock