-
+
+
vehicle.vin === store.order.vehicle.vin
- )
- return matchingVehicle;
- },
+ // selectedVehiclePolicyInfo() {
+ // const matchingVehicle = this.policyVehicles.filter(
+ // (vehicle) => vehicle.vin === store.order.vehicle.vin
+ // )
+ // return matchingVehicle;
+ // },
vehicleDeductible() {
+ if (this.coverageVerified) {
+ if (this.store.order.damage.isRepair) {
+ return this.store.order.policy.deductible.repair;
+ }
+ else {
+ return this.store.order.policy.deductible.replace;
+ }
+ }
//console.log(this.selectedVehicle[0].coverages[0].deductible);
- const deductible = this.selectedVehiclePolicyInfo[0].coverages[0].deductible;
+ //const deductible = this.selectedVehiclePolicyInfo[0].coverages[0].deductible;
//console.log(!this.selectedVehiclePolicyInfo[0].coverages[0]);
- return deductible;
+ //return deductible;
},
isDeductibleZero() {
return this.vehicleDeductible === 0;
},
coverageVerified() {
- const isCoverageVerified = store.order.payment.insuranceCoverage.isVerified;
- return isCoverageVerified;
+ const isVerified = store.order.payment.insuranceCoverage.isVerified;
+ return isVerified;
+ },
+ coverageUnverified() {
+ return true;
+ // const isUnverified = !this.coverageVerified;
+ // return isUnverified;
},
verifiedNoComp() {
if (!this.policyVehicles.coverages || this.policyVehicles.noCoverage === true) {
@@ -166,7 +211,7 @@ export default {
return true;
}
}
- },
+},
async beforeRouteEnter(to, from, next) {
// Call APIs
const cmsContentPromise = fetchCmsContentForPage(to.query.issPage);
@@ -194,28 +239,60 @@ export default {
});
},
methods: {
- arePagePrerequisitesValid() {
- if (useMainStore().vehicle.vin) {
- return true;
- }
- return false;
- },
- getPriceInfo() {
- const servicePrice = store.getPriceOrderItems();
-
- if (servicePrice > this.vehicleDeductible) {
- return this.isITAC = true;
+ processIfStatements,
+ getSubheaderTextFromCms(cmsWidgetName) {
+ return this.getCmsContent(cmsWidgetName, 'SubHeaderText');
+ },
+ getBodyTextFromCms(cmsWidgetName) {
+ const bodyText = this.getCmsContent(cmsWidgetName, "BodyText");
+ return this.processIfStatements(bodyText, "custom", this.getCustomValueFromString);
+ },
+ getSecondaryTextFromCms(cmsWidgetName) {
+ const secondaryText = this.getCmsContent(cmsWidgetName, "SecondaryText");
+ return this.processIfStatements(secondaryText, "custom", this.getCustomValueFromString);
+ },
+ arePagePrerequisitesValid() {
+ if (useMainStore().vehicle.vin) {
+ return true;
}
- },
- async forwardButtonAction() {
- return this.navigateForward();
- },
- navigateForward() {
- this.$router.navigate(
- this.navigationScenarios.CLICKED_FORWARD,
- this.$route
- );
- },
+ return false;
+ },
+ getCustomValueFromString(str) {
+ switch (str) {
+ case 'coverageUnverified':
+ return this.coverageUnverified;
+ case 'verifiedDeductible':
+ return this.verifiedDeductible;
+ case 'verifiedITAC':
+ return this.verifiedITAC;
+ case 'verifiedNoComp':
+ return this.verifiedNoComp;
+ case 'ADASReplace':
+ return this.ADASReplace;
+ case 'nonADASReplace':
+ return this.nonADASReplace;
+ case 'nonADASRepair':
+ return this.nonADASRepair;
+ default:
+ return null;
+ }
+ },
+ getPriceInfo() {
+ const servicePrice = store.getPriceOrderItems();
+
+ if (servicePrice > this.vehicleDeductible) {
+ return this.isITAC = true;
+ }
+ },
+ async forwardButtonAction() {
+ return this.navigateForward();
+ },
+ navigateForward() {
+ this.$router.navigate(
+ this.navigationScenarios.CLICKED_FORWARD,
+ this.$route
+ );
+ },
},
};