CSR-976 cleanup back vin condition

This commit is contained in:
CarlNation 2023-02-03 09:46:54 -05:00
parent 6ee2e80a23
commit adeba5d936

View file

@ -485,19 +485,13 @@ export default {
this.hasGlassLocationWithMultipleParts(allPartsOrQuestions); this.hasGlassLocationWithMultipleParts(allPartsOrQuestions);
const hasChildPartQuestions = this.hasChildPartQuestions(allPartsOrQuestions); const hasChildPartQuestions = this.hasChildPartQuestions(allPartsOrQuestions);
const hasCapabilityQuestions = this.hasCapabilityQuestions(allPartsOrQuestions); const hasCapabilityQuestions = this.hasCapabilityQuestions(allPartsOrQuestions);
const skipVinLookup = await store.dispatch(storeActions.IS_VIN_OPTIONAL_VEHICLE);
const vin = self.$store.getters.vehicle.vin; const vin = self.$store.getters.vehicle.vin;
let backNavigationScenario = let backNavigationScenario =
!vin || vin === "" || skipVinLookup !vin || vin === ""
? navigationScenarios.CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS ? navigationScenarios.CLICKED_BACK_WITH_NO_VIN_NOR_QUESTIONS
: navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS; : navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS;
if (vin) {
backNavigationScenario =
navigationScenarios.CLICKED_BACK_WITH_VIN_AND_NO_MORE_QUESTIONS;
}
if ( if (
hasCapabilityQuestions && hasCapabilityQuestions &&
this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS) this.currentPageComesAfterPage(currentPage, fmgPageValues.CAPABILITY_QUESTIONS)