CSR-1742: improve naming and update how pending status displays pricing
This commit is contained in:
parent
fd5acc6946
commit
acfa099d64
4 changed files with 22 additions and 25 deletions
|
|
@ -11,7 +11,7 @@
|
|||
class="col d-flex justify-content-between py-0">
|
||||
<span class="label">{{ amountDueText }}</span>
|
||||
<span class="label amount-due">{{
|
||||
isCoverageTypeToDisplayPending
|
||||
showCoverageAsPending
|
||||
? verifyingCoverageText
|
||||
: getFormattedAmount("", amountDue)
|
||||
}}</span>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<textBlock cmsWidgetName="DeductibleTextWidget" />
|
||||
<span>
|
||||
{{
|
||||
isCoverageTypeToDisplayPending
|
||||
showCoverageAsPending
|
||||
? verifyingCoverageText
|
||||
: getFormattedAmount("", deductibleLineItem.subTotal)
|
||||
}}
|
||||
|
|
@ -97,8 +97,8 @@
|
|||
</span>
|
||||
<span
|
||||
v-if="
|
||||
!isCoverageTypeToDisplayVerified ||
|
||||
(isCoverageTypeToDisplayVerified && !cartItem.isCoveredByInsurance)
|
||||
!showCoverageAsVerified ||
|
||||
(showCoverageAsVerified && !cartItem.isCoveredByInsurance)
|
||||
"
|
||||
>{{ getFormattedAmount(cartItem.category, cartItem.subTotal) }}</span
|
||||
>
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
<div class="sub-total">
|
||||
<span>{{ subtotalText }}</span>
|
||||
<span>{{
|
||||
isCoverageTypeToDisplayPending
|
||||
showCoverageAsPending
|
||||
? verifyingCoverageText
|
||||
: getFormattedAmount("", subTotal)
|
||||
}}</span>
|
||||
|
|
@ -124,17 +124,14 @@
|
|||
<div class="amount-due">
|
||||
<span>{{ amountDueText }}</span>
|
||||
<span>{{
|
||||
isCoverageTypeToDisplayPending
|
||||
showCoverageAsPending
|
||||
? verifyingCoverageText
|
||||
: getFormattedAmount("", amountDue)
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="
|
||||
insuranceCompanyName &&
|
||||
(isCoverageTypeToDisplayVerified || isCoverageTypeToDisplayPending)
|
||||
"
|
||||
v-if="insuranceCompanyName && (showCoverageAsVerified || showCoverageAsPending)"
|
||||
class="insurance-company-name caption">
|
||||
{{ insuranceCompanyName }}
|
||||
</div>
|
||||
|
|
@ -195,7 +192,7 @@ export default {
|
|||
showAsPaid: Boolean,
|
||||
insuranceDeductible: Number,
|
||||
insuranceCompanyName: String,
|
||||
insuranceCoverageTypeToDisplay: String,
|
||||
showInsuranceCoverageAs: String,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -298,11 +295,11 @@ export default {
|
|||
this.$emit("update:modelValue", newValue);
|
||||
},
|
||||
},
|
||||
isCoverageTypeToDisplayPending() {
|
||||
return this.insuranceCoverageTypeToDisplay === coverageStatus.PENDING;
|
||||
showCoverageAsPending() {
|
||||
return this.showInsuranceCoverageAs === coverageStatus.PENDING;
|
||||
},
|
||||
isCoverageTypeToDisplayVerified() {
|
||||
return this.insuranceCoverageTypeToDisplay === coverageStatus.VERIFIED;
|
||||
showCoverageAsVerified() {
|
||||
return this.showInsuranceCoverageAs === coverageStatus.VERIFIED;
|
||||
},
|
||||
currentDeductible() {
|
||||
const deductible = this.insuranceDeductible;
|
||||
|
|
@ -422,7 +419,7 @@ export default {
|
|||
packagePrice() {
|
||||
let packagePrice = 0;
|
||||
|
||||
if (!this.isCoverageTypeToDisplayVerified) {
|
||||
if (!this.showCoverageAsVerified && !this.showCoverageAsPending) {
|
||||
packagePrice = baseMixin.methods.getTierOnePackagePrice(
|
||||
baseMixin.methods.filterOutFees(this.availableLineItems)
|
||||
);
|
||||
|
|
@ -474,7 +471,7 @@ export default {
|
|||
deductibleLineItem() {
|
||||
let lineItem = null;
|
||||
|
||||
if (this.isCoverageTypeToDisplayVerified || this.isCoverageTypeToDisplayPending) {
|
||||
if (this.showCoverageAsVerified || this.showCoverageAsPending) {
|
||||
lineItem = {
|
||||
name: this.deductibleLineItemName,
|
||||
subTotal: this.currentDeductible,
|
||||
|
|
@ -907,7 +904,7 @@ export default {
|
|||
subTotal() {
|
||||
let subTotal = 0;
|
||||
|
||||
if (this.isCoverageTypeToDisplayVerified) {
|
||||
if (this.showCoverageAsVerified || this.showCoverageAsPending) {
|
||||
// only include items NOT covered by insurance
|
||||
this.cartItems.forEach((cartItem) => {
|
||||
if (!cartItem.isCoveredByInsurance) {
|
||||
|
|
@ -927,7 +924,7 @@ export default {
|
|||
salesTax() {
|
||||
let salesTax = 0;
|
||||
|
||||
if (this.isCoverageTypeToDisplayVerified) {
|
||||
if (this.showCoverageAsVerified || this.showCoverageAsPending) {
|
||||
// only include items NOT covered by insurance
|
||||
this.cartItems.forEach((cartItem) => {
|
||||
if (!cartItem.isCoveredByInsurance) {
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
servicePackageOptionsCmsName="ServicePackageTitle"
|
||||
:insuranceDeductible="currentDeductible"
|
||||
:insuranceCompanyName="insuranceCompanyName"
|
||||
:insuranceCoverageTypeToDisplay="insuranceCoverageTypeToDisplay" />
|
||||
:showInsuranceCoverageAs="showInsuranceCoverageAs" />
|
||||
|
||||
<hr class="mb-5" />
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ export default {
|
|||
}
|
||||
return false;
|
||||
},
|
||||
insuranceCoverageTypeToDisplay() {
|
||||
showInsuranceCoverageAs() {
|
||||
if (!this.isInsurance) return null;
|
||||
if (this.isNoComp) {
|
||||
return coverageStatus.NOCOMP;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
recyclingModalCmsWidgetName="RecycleModal"
|
||||
:insuranceDeductible="currentDeductible"
|
||||
:insuranceCompanyName="insuranceCompanyName"
|
||||
:insuranceCoverageTypeToDisplay="insuranceCoverageTypeToDisplay" />
|
||||
:showInsuranceCoverageAs="showInsuranceCoverageAs" />
|
||||
|
||||
<hr class="my-5" />
|
||||
|
||||
|
|
@ -526,7 +526,7 @@ export default {
|
|||
}
|
||||
return false;
|
||||
},
|
||||
insuranceCoverageTypeToDisplay() {
|
||||
showInsuranceCoverageAs() {
|
||||
if (!this.isInsurance) return null;
|
||||
if (this.isNoComp) {
|
||||
return coverageStatus.NOCOMP;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
recyclingModalCmsWidgetName="RecycleModal"
|
||||
:insuranceDeductible="currentDeductible"
|
||||
:insuranceCompanyName="insuranceCompanyName"
|
||||
:insuranceCoverageTypeToDisplay="insuranceCoverageTypeToDisplay" />
|
||||
:showInsuranceCoverageAs="showInsuranceCoverageAs" />
|
||||
|
||||
<hr class="mb-5" />
|
||||
|
||||
|
|
@ -440,7 +440,7 @@ export default {
|
|||
}
|
||||
return false;
|
||||
},
|
||||
insuranceCoverageTypeToDisplay() {
|
||||
showInsuranceCoverageAs() {
|
||||
if (!this.isInsurance) return null;
|
||||
if (this.isNoComp) {
|
||||
return coverageStatus.NOCOMP;
|
||||
|
|
|
|||
Loading…
Reference in a new issue