replace missing methods
This commit is contained in:
parent
e7d15c2135
commit
ceac399c12
1 changed files with 43 additions and 22 deletions
|
|
@ -67,7 +67,6 @@ import { useMainStore } from "@/store";
|
|||
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
|
||||
import { processIfStatements } from '@/helpers/cms-content-helper';
|
||||
|
||||
|
||||
const store = useMainStore();
|
||||
|
||||
export default {
|
||||
|
|
@ -84,7 +83,7 @@ export default {
|
|||
},
|
||||
mounted() {
|
||||
setupModalLinks(this);
|
||||
this.getPriceInfo();
|
||||
//this.getPriceInfo();
|
||||
},
|
||||
computed: {
|
||||
coverageStatementSubHeader() {
|
||||
|
|
@ -177,13 +176,13 @@ export default {
|
|||
return !this.isVerified;
|
||||
},
|
||||
verifiedNoComp() {
|
||||
return this.store.order.policy.noCompensation;
|
||||
return store.order.policy.noCompensation;
|
||||
// if (!this.policyVehicles.coverages || this.policyVehicles.noCoverage === true) {
|
||||
// return true;
|
||||
// }
|
||||
},
|
||||
verifiedITAC() {
|
||||
this.getPriceInfo();
|
||||
//this.getPriceInfo();
|
||||
return this.ITAC;
|
||||
},
|
||||
verifiedDeductible() {
|
||||
|
|
@ -203,7 +202,7 @@ export default {
|
|||
if (store.order.damage.isRepair) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
async beforeRouteEnter(to, from, next) {
|
||||
// Call APIs
|
||||
|
|
@ -232,23 +231,45 @@ export default {
|
|||
});
|
||||
},
|
||||
methods: {
|
||||
arePagePrerequisitesValid() {
|
||||
if (useMainStore().vehicle.vin) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
|
||||
async forwardButtonAction() {
|
||||
return this.navigateForward();
|
||||
},
|
||||
|
||||
navigateForward() {
|
||||
this.$router.navigate(
|
||||
this.navigationScenarios.CLICKED_FORWARD,
|
||||
this.$route
|
||||
);
|
||||
},
|
||||
processIfStatements,
|
||||
getSubheaderTextFromCms(cmsWidgetName) {
|
||||
const subHeader = this.getCmsContent(cmsWidgetName, 'SubHeaderText');
|
||||
return this.processIfStatements(subHeader, "custom", this.getCustomValueFromString);
|
||||
},
|
||||
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;
|
||||
}
|
||||
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;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue