replace missing methods

This commit is contained in:
Katie Kroell 2023-07-06 20:08:14 -04:00
parent e7d15c2135
commit ceac399c12

View file

@ -67,7 +67,6 @@ import { useMainStore } from "@/store";
import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin"; import vehicleQuestionsMixin from "@/mixins/vehicle-questions-mixin";
import { processIfStatements } from '@/helpers/cms-content-helper'; import { processIfStatements } from '@/helpers/cms-content-helper';
const store = useMainStore(); const store = useMainStore();
export default { export default {
@ -84,7 +83,7 @@ export default {
}, },
mounted() { mounted() {
setupModalLinks(this); setupModalLinks(this);
this.getPriceInfo(); //this.getPriceInfo();
}, },
computed: { computed: {
coverageStatementSubHeader() { coverageStatementSubHeader() {
@ -177,13 +176,13 @@ export default {
return !this.isVerified; return !this.isVerified;
}, },
verifiedNoComp() { verifiedNoComp() {
return this.store.order.policy.noCompensation; return store.order.policy.noCompensation;
// if (!this.policyVehicles.coverages || this.policyVehicles.noCoverage === true) { // if (!this.policyVehicles.coverages || this.policyVehicles.noCoverage === true) {
// return true; // return true;
// } // }
}, },
verifiedITAC() { verifiedITAC() {
this.getPriceInfo(); //this.getPriceInfo();
return this.ITAC; return this.ITAC;
}, },
verifiedDeductible() { verifiedDeductible() {
@ -203,7 +202,7 @@ export default {
if (store.order.damage.isRepair) { if (store.order.damage.isRepair) {
return true; return true;
} }
} },
}, },
async beforeRouteEnter(to, from, next) { async beforeRouteEnter(to, from, next) {
// Call APIs // Call APIs
@ -232,23 +231,45 @@ export default {
}); });
}, },
methods: { methods: {
arePagePrerequisitesValid() { processIfStatements,
if (useMainStore().vehicle.vin) { getSubheaderTextFromCms(cmsWidgetName) {
return true; const subHeader = this.getCmsContent(cmsWidgetName, 'SubHeaderText');
} return this.processIfStatements(subHeader, "custom", this.getCustomValueFromString);
return false; },
}, getBodyTextFromCms(cmsWidgetName) {
const bodyText = this.getCmsContent(cmsWidgetName, "BodyText");
async forwardButtonAction() { return this.processIfStatements(bodyText, "custom", this.getCustomValueFromString);
return this.navigateForward(); },
}, getSecondaryTextFromCms(cmsWidgetName) {
const secondaryText = this.getCmsContent(cmsWidgetName, "SecondaryText");
navigateForward() { return this.processIfStatements(secondaryText, "custom", this.getCustomValueFromString);
this.$router.navigate( },
this.navigationScenarios.CLICKED_FORWARD, arePagePrerequisitesValid() {
this.$route 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> </script>