Simplifying

This commit is contained in:
Michaela Brydon 2024-02-29 15:02:34 -05:00
parent e40a7eef23
commit 9e346265cc

View file

@ -10,7 +10,7 @@
href="javascript:void(0)"
class="col d-flex justify-content-between py-0">
<span class="label color-black">{{ amountDueLabel }}</span>
<span class="label amount-due">{{ getDisplayedByUnverified(amountDue) }}</span>
<span class="label amount-due">{{ getDisplayed(amountDue) }}</span>
</a>
</div>
<div
@ -26,7 +26,7 @@
<span
id="deductible-label"
class="label">{{ deductibleLabel }}</span>
<span id="deductible-value">{{ getDisplayedByUnverified(deductible) }}</span>
<span id="deductible-value">{{ getDisplayed(deductible) }}</span>
</div>
<div
v-else
@ -35,7 +35,7 @@
<span
id="base-price-label"
class="label">{{ BasePriceLabel }}</span>
<span id="base-price-value">{{ getFormattedAmount(baseServicePrice) }}</span>
<span id="base-price-value">{{ getDisplayed(baseServicePrice) }}</span>
</div>
</div>
</div>
@ -79,6 +79,7 @@ export default {
}
];
},
// TODO share with claim registration page
baseServicePrice() {
return this.availableLineItems
.reduce(
@ -94,6 +95,7 @@ export default {
&& (this.deductible == null || !useMainStore().isVerifiedCoverageStatus);
},
subTotal() {
// TODO partial calculation for now
return this.showDeductibleLineItem ? this.deductible : this.baseServicePrice;
},
salesTax() {
@ -112,11 +114,12 @@ export default {
getFormattedAmount(amount) {
return this.currencyFormatter.format(amount);
},
// TODO share with claim registration page
getTotalLineItemPrice(lineItem) {
return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice;
},
getDisplayedByUnverified(amount) {
return this.isUnverified
getDisplayed(amount) {
return this.isUnverified && this.showDeductibleLineItem
? VERIFYING_COVERAGE
: this.getFormattedAmount(amount);
}