Removing unnecessary
This commit is contained in:
parent
b2cb23ca18
commit
954a089721
1 changed files with 6 additions and 9 deletions
|
|
@ -181,7 +181,8 @@ export default {
|
|||
|
||||
let hasBailedOut = false;
|
||||
let pricingResults = [];
|
||||
if (useMainStore().policy.policyLookupSuccessful && useMainStore().vehicle.policyVehicleId >= 0) {
|
||||
const { policy, vehicle } = useMainStore();
|
||||
if (policy.policyLookupSuccessful && vehicle.policyVehicleId >= 0) {
|
||||
await useMainStore().getFinalDeductible();
|
||||
pricingResults = await useMainStore().getPriceOrderItems(availableLineItems)
|
||||
.catch((err) => {
|
||||
|
|
@ -210,12 +211,7 @@ export default {
|
|||
}
|
||||
},
|
||||
data() {
|
||||
const { isRepair } = useMainStore().damage;
|
||||
// const { policyLookupSuccessful } = useMainStore().policy;
|
||||
return {
|
||||
isRepair,
|
||||
// policyLookupSuccessful,
|
||||
isNoComp: useMainStore().isNoComp,
|
||||
baseServiceLineItems: [],
|
||||
selectedProvider: '',
|
||||
deductibleText: 'Your deductible is',
|
||||
|
|
@ -440,6 +436,7 @@ export default {
|
|||
return processIfStatements(rawText, 'custom', this.getCustomValueFromString);
|
||||
},
|
||||
getCustomValueFromString(str) {
|
||||
const { isRepair } = useMainStore().damage;
|
||||
switch (str) {
|
||||
case 'coverageUnverified':
|
||||
return this.isUnverifiedVisible;
|
||||
|
|
@ -450,11 +447,11 @@ export default {
|
|||
case 'verifiedNoComp':
|
||||
return this.isNoCompQuoteVisible;
|
||||
case 'ADASReplace':
|
||||
return !this.isRepair && this.isADAS;
|
||||
return !isRepair && this.isADAS;
|
||||
case 'nonADASReplace':
|
||||
return !this.isRepair && !this.isADAS;
|
||||
return !isRepair && !this.isADAS;
|
||||
case 'nonADASRepair':
|
||||
return this.isRepair;
|
||||
return isRepair;
|
||||
case 'deductibleOverZero':
|
||||
return this.isDeductibleVisible && this.deductibleValue !== 0; // TODO what if deductible is negative?
|
||||
case 'isDeductibleZero':
|
||||
|
|
|
|||
Loading…
Reference in a new issue