sync up with most recent changes

This commit is contained in:
Katie Kroell 2023-07-28 15:39:40 -04:00
parent ca58d87083
commit 73044bac7a

View file

@ -176,9 +176,6 @@ export default {
}, },
data() { data() {
return { return {
// isVerified: useMainStore().order.payment.insuranceCoverage.isVerified,
// supportingItems: [],
// pricedGlassParts: [],
availableLineItems: [], availableLineItems: [],
selectedProvider: '', selectedProvider: '',
deductibleText: 'Your deductible is:', deductibleText: 'Your deductible is:',
@ -203,27 +200,19 @@ export default {
'BodyText')?.replaceAll('{custom:costSavings}', this.costSavings); 'BodyText')?.replaceAll('{custom:costSavings}', this.costSavings);
}, },
coverageStatementSubHeader() { coverageStatementSubHeader() {
const subheader = this.getSubheaderTextFromCms('SiteSubHeaderWidget'); return this.getSubheaderTextFromCms('SiteSubHeaderWidget');
return subheader;
}, },
secondaryText() { secondaryText() {
const secondaryText = this.getSecondaryTextFromCms('SiteSubHeaderWidget'); return this.getSecondaryTextFromCms('SiteSubHeaderWidget');
return secondaryText;
}, },
explanatoryText() { explanatoryText() {
const explanatoryText = this.getExplantoryTextFromCms('ExplanatoryTextWidget'); return this.getExplantoryTextFromCms('ExplanatoryTextWidget');
return explanatoryText;
}, },
nextStepsHeader() { nextStepsHeader() {
const header = this.getHeaderTextFromCms('NextStepsWidget'); return this.getHeaderTextFromCms('NextStepsWidget');
return header;
}, },
nextStepsBody() { nextStepsBody() {
const body = this.getBodyTextFromCms('NextStepsWidget')?.replaceAll('{custom:damage}', this.damageText); return this.getBodyTextFromCms('NextStepsWidget')?.replaceAll('{custom:damage}', this.damageText);
return body;
},
continueWithSchedulingBodyText() {
return this.getCmsContent('continueWithSchedulingCopy', 'BodyText');
}, },
unverifiedADASNextStepsBodyText() { unverifiedADASNextStepsBodyText() {
return this.getCmsContent('UnverifiedADASNextStepsWidget', 'BodyText')?.replaceAll('{custom:damage}', this.damageText); return this.getCmsContent('UnverifiedADASNextStepsWidget', 'BodyText')?.replaceAll('{custom:damage}', this.damageText);
@ -239,12 +228,12 @@ export default {
return damageString === 'match' ? '' : damageString; return damageString === 'match' ? '' : damageString;
}, },
vehicleDeductible() { vehicleDeductible() {
if (this.mainStore.order.damage.isRepair) { if (useMainStore().order.damage.isRepair) {
const repairDeductible = this.mainStore.order.policy.deductible.repair; const repairDeductible = useMainStore().order.policy.deductible.repair;
return repairDeductible; return repairDeductible;
} }
const replaceDeductible = this.mainStore.order.policy.deductible.replace; const replaceDeductible = useMainStore().order.policy.deductible.replace;
return replaceDeductible; return replaceDeductible;
}, },
formattedDeductible() { formattedDeductible() {
@ -260,7 +249,7 @@ export default {
return useMainStore().payment.insuranceCoverage.isVerified; return useMainStore().payment.insuranceCoverage.isVerified;
}, },
verifiedNoComp() { verifiedNoComp() {
return this.policyLookupSuccessful ? store.order.policy.noCoverage : false; return this.policyLookupSuccessful ? useMainStore().order.policy.noCoverage : false;
}, },
verifiedITAC() { verifiedITAC() {
return this.policyLookupSuccessful return this.policyLookupSuccessful
@ -271,7 +260,7 @@ export default {
return !this.verifiedNoComp && this.totalServicePrice >= this.vehicleDeductible; return !this.verifiedNoComp && this.totalServicePrice >= this.vehicleDeductible;
}, },
verifiedDeductible() { verifiedDeductible() {
return this.isClaimRegistrationRequired return useMainStore().isClaimRegistrationRequired
? this.registerClaimSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible ? this.registerClaimSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible
: this.policyLookupSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible; : this.policyLookupSuccessful && this.coveredAndServicePriceAboveOrEqualDeductible;
}, },
@ -279,11 +268,11 @@ export default {
return !this.verifiedDeductible && !this.verifiedITAC && !this.verifiedNoComp; return !this.verifiedDeductible && !this.verifiedITAC && !this.verifiedNoComp;
}, },
isADAS() { isADAS() {
const parts = store.order.lineItems.glassParts; const parts = useMainStore().order.lineItems.glassParts;
return parts != null && parts.find((part) => part.requiresRecalibration); return parts != null && parts.find((part) => part.requiresRecalibration);
}, },
isRepair() { isRepair() {
return this.mainStore.order.damage.isRepair; return useMainStore().order.damage.isRepair;
}, },
totalServicePrice() { totalServicePrice() {
let total = 0; let total = 0;
@ -339,10 +328,7 @@ export default {
}, },
methods: { methods: {
arePagePrerequisitesValid() { arePagePrerequisitesValid() {
if (useMainStore().vehicle.vin) { return !!useMainStore().vehicle.vin;
return true;
}
return false;
}, },
async forwardButtonAction() { async forwardButtonAction() {
return this.navigateForward(); return this.navigateForward();
@ -355,8 +341,8 @@ export default {
if (this.selectedProvider === 'Safelite') { if (this.selectedProvider === 'Safelite') {
this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE, this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE,
this.$route); this.$route);
} else if (store.issConfig.enableTPAFlow) { } else if (useMainStore().issConfig.enableTPAFlow) {
this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_TPA_DISABLED, this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED,
this.$route); this.$route);
} else { } else {
this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_TPA_DISABLED, this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_TPA_DISABLED,
@ -428,8 +414,7 @@ export default {
return `$${formattedPriceFloat}`; return `$${formattedPriceFloat}`;
}, },
getITACCostSavings(vehicleDeductible, totalServicePrice) { getITACCostSavings(vehicleDeductible, totalServicePrice) {
const savings = vehicleDeductible - totalServicePrice; return vehicleDeductible - totalServicePrice;
return savings;
} }
} }
}; };