Removing unnecessary computed

This commit is contained in:
Michaela Brydon 2024-03-28 16:53:42 -04:00
parent 8f8b255694
commit db86be9bf9
2 changed files with 8 additions and 7 deletions

View file

@ -6,6 +6,8 @@ Object {
"deductible": null,
"glassToReplace": Array [],
"isExpanded": false,
"isITAC": false,
"isNoComp": false,
"isRepair": null,
"vapsInOrder": Array [],
"widget": Object {

View file

@ -23,7 +23,7 @@
id="cart-deductible-or-base-price"
class="cart-item cart-gray">
<div
v-if="showDeductibleLineItem"
v-if="!isNoComp && !isITAC"
id="cart-deductible"
class="d-flex justify-content-between align-items-center">
<span id="deductible-label">{{ deductibleLabel }}</span>
@ -178,6 +178,8 @@ export default {
const { supportingItems, glassParts, otherParts, vaps } = useMainStore().lineItems;
return {
isNoComp: useMainStore().isNoComp,
isITAC: useMainStore().policy.isITAC,
isRepair,
glassToReplace: glassToReplace ?? [],
vapsInOrder: vaps ?? [],
@ -205,15 +207,12 @@ export default {
baseServicePrice() {
return getPriceOfLineItems(this.baseServiceLineItems);
},
showDeductibleLineItem() {
return !useMainStore().isNoComp && !useMainStore().policy.isITAC;
},
isUnverified() {
return this.showDeductibleLineItem
return !this.isNoComp && !this.isITAC
&& (this.deductible == null || !useMainStore().isVerifiedCoverageStatus);
},
subTotal() {
const basePrice = this.showDeductibleLineItem
const basePrice = !this.isNoComp && !this.isITAC
? this.deductible
: this.baseServicePrice;
return basePrice + this.packagePrice;
@ -332,7 +331,7 @@ export default {
this.isExpanded = !this.isExpanded;
},
getDisplayed(amount) {
return this.isUnverified && this.showDeductibleLineItem
return this.isUnverified && !this.isNoComp && !this.isITAC
? VERIFYING_COVERAGE
: formatAmountInDollars(amount);
},