CASH-132: check if donation is present in session and output it

This commit is contained in:
Adam Caouette 2025-02-07 18:37:06 -05:00
parent a54763a98d
commit b7e471f0a7

View file

@ -67,6 +67,8 @@
<div class="mt-3">
<donationBlock cmsWidgetName="DonationWidget" />
</div>
<h3>donationAdded: {{ donationAdded }}</h3>
<button type="button" @click="addDonation(3)">Add Donation of $3</button>
@ -454,6 +456,15 @@ export default {
);
}
},
donationAdded() {
const donationItems = this.submittedOrder?.lineItems?.supportingItems?.filter(
(item) => item.partNumber === "DONATION"
);
if (donationItems?.length > 0) {
return donationItems[0].sellingPrice;
}
return 0;
},
},
methods: {
arePagePrerequisitesValid() {