navigation when glass is not available
This commit is contained in:
parent
406d565efb
commit
ecee185d82
2 changed files with 18 additions and 1 deletions
|
|
@ -89,6 +89,7 @@ export default {
|
|||
vehicleFromLookup: null,
|
||||
licensePlate: null,
|
||||
registrationZipCode: null,
|
||||
isCarIdDifferent: false,
|
||||
};
|
||||
},
|
||||
provide() {
|
||||
|
|
@ -142,7 +143,7 @@ export default {
|
|||
this.vehicleFromLookup = vehicleLookupResponse.data.vehicle;
|
||||
if (this.vehicleFromLookup.carId !== this.mainStore.vehicle.carId) {
|
||||
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_MATCHED;
|
||||
|
||||
this.isCarIdDifferent = true;
|
||||
const vehicleYearMakeModel = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model}`;
|
||||
|
||||
this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModel}`);
|
||||
|
|
@ -151,6 +152,18 @@ export default {
|
|||
|
||||
// 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() {
|
||||
this.activeVehicleLookupAlertType = null;
|
||||
|
|
|
|||
|
|
@ -109,6 +109,10 @@ const routingTable = function(store) {
|
|||
{
|
||||
scenario: navigationScenarios.CLICKED_BACK,
|
||||
destinationIssPageValue: issPageValues.VEHICLE_LOOKUP,
|
||||
},
|
||||
{
|
||||
scenario: navigationScenarios.CLICKED_FORWARD,
|
||||
destinationIssPageValue: issPageValues.VEHICLE_DAMAGE,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue