navigation when glass is not available

This commit is contained in:
Kroell 2023-01-16 11:59:49 -05:00
parent 406d565efb
commit ecee185d82
2 changed files with 18 additions and 1 deletions

View file

@ -89,6 +89,7 @@ export default {
vehicleFromLookup: null, vehicleFromLookup: null,
licensePlate: null, licensePlate: null,
registrationZipCode: null, registrationZipCode: null,
isCarIdDifferent: false,
}; };
}, },
provide() { provide() {
@ -142,7 +143,7 @@ export default {
this.vehicleFromLookup = vehicleLookupResponse.data.vehicle; this.vehicleFromLookup = vehicleLookupResponse.data.vehicle;
if (this.vehicleFromLookup.carId !== this.mainStore.vehicle.carId) { if (this.vehicleFromLookup.carId !== this.mainStore.vehicle.carId) {
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_MATCHED; this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_MATCHED;
this.isCarIdDifferent = true;
const vehicleYearMakeModel = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model}`; const vehicleYearMakeModel = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model}`;
this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModel}`); this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModel}`);
@ -151,6 +152,18 @@ export default {
// Continue // Continue
}, },
async navigateForward() {
if (this.isCarIdDifferent && !this.isSelectedGlassAvailableForVehicle) {
this.$router.navigate(
this.navigationScenarios.CLICKED_FORWARD,
this.$route,
{},
{ [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }
);
} else {
await this.navigateForwardWithSingleCarMatch();
}
},
resetActiveAlert() { resetActiveAlert() {
this.activeVehicleLookupAlertType = null; this.activeVehicleLookupAlertType = null;

View file

@ -110,6 +110,10 @@ const routingTable = function(store) {
scenario: navigationScenarios.CLICKED_BACK, scenario: navigationScenarios.CLICKED_BACK,
destinationIssPageValue: issPageValues.VEHICLE_LOOKUP, destinationIssPageValue: issPageValues.VEHICLE_LOOKUP,
}, },
{
scenario: navigationScenarios.CLICKED_FORWARD,
destinationIssPageValue: issPageValues.VEHICLE_DAMAGE,
},
], ],
}, },
{ {