Removing unnecessary computed
This commit is contained in:
parent
8f8b255694
commit
db86be9bf9
2 changed files with 8 additions and 7 deletions
|
|
@ -6,6 +6,8 @@ Object {
|
||||||
"deductible": null,
|
"deductible": null,
|
||||||
"glassToReplace": Array [],
|
"glassToReplace": Array [],
|
||||||
"isExpanded": false,
|
"isExpanded": false,
|
||||||
|
"isITAC": false,
|
||||||
|
"isNoComp": false,
|
||||||
"isRepair": null,
|
"isRepair": null,
|
||||||
"vapsInOrder": Array [],
|
"vapsInOrder": Array [],
|
||||||
"widget": Object {
|
"widget": Object {
|
||||||
|
|
|
||||||
|
|
@ -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="!isNoComp && !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>
|
||||||
|
|
@ -178,6 +178,8 @@ export default {
|
||||||
const { supportingItems, glassParts, otherParts, vaps } = useMainStore().lineItems;
|
const { supportingItems, glassParts, otherParts, vaps } = useMainStore().lineItems;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
isNoComp: useMainStore().isNoComp,
|
||||||
|
isITAC: useMainStore().policy.isITAC,
|
||||||
isRepair,
|
isRepair,
|
||||||
glassToReplace: glassToReplace ?? [],
|
glassToReplace: glassToReplace ?? [],
|
||||||
vapsInOrder: vaps ?? [],
|
vapsInOrder: vaps ?? [],
|
||||||
|
|
@ -205,15 +207,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 !this.isNoComp && !this.isITAC
|
||||||
&& (this.deductible == null || !useMainStore().isVerifiedCoverageStatus);
|
&& (this.deductible == null || !useMainStore().isVerifiedCoverageStatus);
|
||||||
},
|
},
|
||||||
subTotal() {
|
subTotal() {
|
||||||
const basePrice = this.showDeductibleLineItem
|
const basePrice = !this.isNoComp && !this.isITAC
|
||||||
? this.deductible
|
? this.deductible
|
||||||
: this.baseServicePrice;
|
: this.baseServicePrice;
|
||||||
return basePrice + this.packagePrice;
|
return basePrice + this.packagePrice;
|
||||||
|
|
@ -332,7 +331,7 @@ export default {
|
||||||
this.isExpanded = !this.isExpanded;
|
this.isExpanded = !this.isExpanded;
|
||||||
},
|
},
|
||||||
getDisplayed(amount) {
|
getDisplayed(amount) {
|
||||||
return this.isUnverified && this.showDeductibleLineItem
|
return this.isUnverified && !this.isNoComp && !this.isITAC
|
||||||
? VERIFYING_COVERAGE
|
? VERIFYING_COVERAGE
|
||||||
: formatAmountInDollars(amount);
|
: formatAmountInDollars(amount);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue