More cleanup
This commit is contained in:
parent
1cd30deb49
commit
bb5b200d30
2 changed files with 10 additions and 12 deletions
|
|
@ -401,11 +401,15 @@ export default {
|
||||||
if (!this.lineItems || this.lineItems.length < 1) {
|
if (!this.lineItems || this.lineItems.length < 1) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
let supportingItemsToAdd = [];
|
||||||
|
if (this.lineItems.supportingItems) {
|
||||||
|
supportingItemsToAdd = this.lineItems.supportingItems.filter(
|
||||||
|
(item) => item.partType !== partTypeStrings.DONATION
|
||||||
|
)
|
||||||
|
}
|
||||||
return [
|
return [
|
||||||
...(this.lineItems.glassParts ?? []),
|
...(this.lineItems.glassParts ?? []),
|
||||||
...(this.lineItems.supportingItems.filter(
|
...supportingItemsToAdd,
|
||||||
(item) => item.partType !== partTypeStrings.DONATION
|
|
||||||
) ?? []),
|
|
||||||
...(this.availableVaps ?? []),
|
...(this.availableVaps ?? []),
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|
@ -1074,11 +1078,7 @@ export default {
|
||||||
const donationLineItem = this.lineItems.supportingItems.find(
|
const donationLineItem = this.lineItems.supportingItems.find(
|
||||||
(item) => item.partType === partTypeStrings.DONATION
|
(item) => item.partType === partTypeStrings.DONATION
|
||||||
);
|
);
|
||||||
if (donationLineItem?.sellingPrice !== 0) {
|
return !!donationLineItem;
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
donationCartItemName() {
|
donationCartItemName() {
|
||||||
return this.getCmsContent("DonationCartTextWidget", "Text");
|
return this.getCmsContent("DonationCartTextWidget", "Text");
|
||||||
|
|
@ -1092,7 +1092,7 @@ export default {
|
||||||
(item) => item.partType === partTypeStrings.DONATION
|
(item) => item.partType === partTypeStrings.DONATION
|
||||||
);
|
);
|
||||||
|
|
||||||
if (donationLineItem?.sellingPrice > 0) {
|
if (donationLineItem) {
|
||||||
return {
|
return {
|
||||||
name: this.donationCartItemName,
|
name: this.donationCartItemName,
|
||||||
category: cartItemCategories.SUPPORTING_ITEMS,
|
category: cartItemCategories.SUPPORTING_ITEMS,
|
||||||
|
|
|
||||||
|
|
@ -63,9 +63,7 @@
|
||||||
:isExpandedOnLoad="false"
|
:isExpandedOnLoad="false"
|
||||||
:isItac="isItac"
|
:isItac="isItac"
|
||||||
:isNoComp="isNoComp"
|
:isNoComp="isNoComp"
|
||||||
:isMSRFeeApplicable="isMSRFeeApplicable"
|
:isMSRFeeApplicable="isMSRFeeApplicable" />
|
||||||
:donationAmount="donationAmount"
|
|
||||||
@update-donation-amount="updateDonationAmount" />
|
|
||||||
|
|
||||||
<div class="mt-3" v-if="DisplayFosterLove">
|
<div class="mt-3" v-if="DisplayFosterLove">
|
||||||
<donationBlock
|
<donationBlock
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue