SSR-1431 Bailout for heavy truck on vin-lookup page

This commit is contained in:
Josh Dassinger 2024-07-25 08:08:58 -05:00
parent 2d3c799bc1
commit 29bf33bdc7

View file

@ -185,8 +185,7 @@ export default {
const vehicleLookupResponse = await this.lookupVehicleByVin(this.vin);
if (vehicleLookupResponse.error) {
this.activeVehicleLookupAlertType =
vehicleLookupAlertTypes.NOT_FOUND;
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_FOUND;
this.mainStore.setBailout(bailoutMessage.vehicleNotFound(this.vin));
this.resetVehicleFromLookup();
this.$refs.siteFooter.removeLoader();
@ -197,6 +196,12 @@ export default {
return;
}
if (!vehicleLookupResponse.data.canSafeliteService) {
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId));
this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD_WITH_BAILOUT, this.$route);
return;
}
this.mainStore.resetBailout();
// Add vin bcs the response from the service doesn't contain vin