updates to navigation

This commit is contained in:
Katie Kroell 2023-07-27 16:22:14 -04:00
parent 85c29e04be
commit 7d21d3b697

View file

@ -114,6 +114,7 @@ import { useMainStore } from '@/store/index.js';
import vehicleQuestionsMixin from '@/mixins/vehicle-questions-mixin.js';
import globalRules from '@/constants/global-rules.js';
import baseFormMixin from '@/mixins/base-form-mixin.js';
import { navigationScenarios } from '@/router/router-constants/navigation-scenarios.js';
export default {
name: 'coverage-statement',
@ -125,7 +126,8 @@ export default {
recalModal,
alert,
contentGroupModal,
buttonQuestion
buttonQuestion,
navigationScenarios
},
mixins: [baseFormMixin, vehicleQuestionsMixin],
async beforeRouteEnter(to, from, next) {
@ -350,20 +352,24 @@ export default {
},
async navigateForward() {
if (this.coverageUnverified || this.verifiedDeductible) {
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD,
this.$router.navigate(navigationScenarios.CLICKED_FORWARD,
this.$route);
} else if (this.verifiedITAC || this.verifiedNoComp) {
if (this.selectedProvider === 'Safelite') {
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE,
this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_SAFELITE,
this.$route);
} else if (this.selectedProvider === 'Other' && this.mainStore.issConfig.enableTPAFlow) {
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED,
this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_TPA_ENABLED,
this.$route);
} else {
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_TPA_DISABLED,
this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_TPA_DISABLED,
this.$route);
}
}
else {
this.$router.navigate(navigationScenarios.CLICKED_FORWARD_WITH_INVALID_STATE,
this.$route);
}
},
openModalAction(modalName) {
this.$refs[modalName.args].openModal();