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