This commit is contained in:
Michaela Brydon 2024-03-28 15:17:16 -04:00
parent 9a8bdb48bc
commit c3228fb7a8

View file

@ -23,7 +23,7 @@
id="cart-deductible-or-base-price" id="cart-deductible-or-base-price"
class="cart-item cart-gray"> class="cart-item cart-gray">
<div <div
v-if="showDeductibleLineItem" v-if="!useMainStore().isNoComp && !useMainStore().policy.isITAC"
id="cart-deductible" id="cart-deductible"
class="d-flex justify-content-between align-items-center"> class="d-flex justify-content-between align-items-center">
<span id="deductible-label">{{ deductibleLabel }}</span> <span id="deductible-label">{{ deductibleLabel }}</span>
@ -41,7 +41,7 @@
<!-- Packaged Cart Items --> <!-- Packaged Cart Items -->
<div <div
id="cart-service-package" id="cart-service-package"
class="color-darker-gray px-5"> class="px-5">
<div <div
id="service-package-name" id="service-package-name"
class="py-1 d-flex justify-content-between align-items-center"> class="py-1 d-flex justify-content-between align-items-center">
@ -60,7 +60,6 @@
<span>{{ item?.name ?? '' }}</span> <span>{{ item?.name ?? '' }}</span>
<textLink <textLink
v-if="!readOnly || !showAsPaid" v-if="!readOnly || !showAsPaid"
ref="removeLink"
linkType="text" linkType="text"
text="Remove" text="Remove"
href="javascript:void(0)" href="javascript:void(0)"
@ -74,10 +73,8 @@
</div> </div>
</div> </div>
<!-- Nonpackaged Cart Items --> <!-- NonPackaged Cart Items -->
<div <div id="non-packaged-cart-items">
id="non-packaged-cart-items"
class="">
<div <div
v-for="(item, i) in nonServicePackageCartItems" v-for="(item, i) in nonServicePackageCartItems"
:key="i" :key="i"
@ -99,7 +96,6 @@
<div class="px-5"> <div class="px-5">
<textLink <textLink
v-if="item.isRemovable && (!readOnly || !showAsPaid)" v-if="item.isRemovable && (!readOnly || !showAsPaid)"
ref="removeLink"
linkType="text" linkType="text"
text="Remove" text="Remove"
href="javascript:void(0)" href="javascript:void(0)"
@ -208,15 +204,12 @@ export default {
baseServicePrice() { baseServicePrice() {
return getPriceOfLineItems(this.baseServiceLineItems); return getPriceOfLineItems(this.baseServiceLineItems);
}, },
showDeductibleLineItem() {
return !useMainStore().isNoComp && !useMainStore().policy.isITAC;
},
isUnverified() { isUnverified() {
return this.showDeductibleLineItem return !useMainStore().isNoComp && !useMainStore().policy.isITAC
&& (this.deductible == null || !useMainStore().isVerifiedCoverageStatus); && (this.deductible == null || !useMainStore().isVerifiedCoverageStatus);
}, },
subTotal() { subTotal() {
const basePrice = this.showDeductibleLineItem const basePrice = !useMainStore().isNoComp && !useMainStore().policy.isITAC
? this.deductible ? this.deductible
: this.baseServicePrice; : this.baseServicePrice;
const nonPackageCartItemsPrice = this.nonServicePackageCartItems.reduce( const nonPackageCartItemsPrice = this.nonServicePackageCartItems.reduce(
@ -373,7 +366,10 @@ export default {
this.isExpanded = !this.isExpanded; this.isExpanded = !this.isExpanded;
}, },
getDisplayed(amount, canBeVerifyingCoverage = true) { getDisplayed(amount, canBeVerifyingCoverage = true) {
return canBeVerifyingCoverage && this.isUnverified && this.showDeductibleLineItem return canBeVerifyingCoverage
&& this.isUnverified
&& !useMainStore().isNoComp
&& !useMainStore().policy.isITAC
? VERIFYING_COVERAGE ? VERIFYING_COVERAGE
: formatAmountInDollars(amount); : formatAmountInDollars(amount);
}, },
@ -447,11 +443,6 @@ export default {
color: $darker-gray; color: $darker-gray;
} }
.cart-line-item {
padding: 0.25rem 1.5rem;
color: $darker-gray;
}
.cart-table { .cart-table {
max-height: 0; max-height: 0;
transition: all 350ms ease-in; transition: all 350ms ease-in;