CASH-132: check if donation is present in session and output it
This commit is contained in:
parent
a54763a98d
commit
b7e471f0a7
1 changed files with 11 additions and 0 deletions
|
|
@ -67,6 +67,8 @@
|
||||||
<div class="mt-3">
|
<div class="mt-3">
|
||||||
<donationBlock cmsWidgetName="DonationWidget" />
|
<donationBlock cmsWidgetName="DonationWidget" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h3>donationAdded: {{ donationAdded }}</h3>
|
||||||
|
|
||||||
<button type="button" @click="addDonation(3)">Add Donation of $3</button>
|
<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: {
|
methods: {
|
||||||
arePagePrerequisitesValid() {
|
arePagePrerequisitesValid() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue