reset heavy truck bailout before looking up a new vehicle

This commit is contained in:
Katie Kroell 2026-03-16 11:07:12 -04:00
parent 2e4bfaaab6
commit cd4cf33db5
3 changed files with 4 additions and 4 deletions

View file

@ -215,6 +215,7 @@ export default {
async forwardButtonAction() {
this.resetWarningsAndErrors();
this.mainStore.resetBailout();
// Vehicle info change in the flow, use a variable to keep track and commit to state at the end.
let vehicleInfoToCommit = {};
@ -361,7 +362,6 @@ export default {
this.displayVinNotFoundAlert = false;
this.displayMatchedDifferentVehicleAlert = false;
this.displayVinLookupByHomeAddressNotAllowedAlert = false;
this.displayNoServiceAlert = false;
this.$refs.siteFooter.enableForwardAction();
}
}

View file

@ -239,6 +239,7 @@ export default {
// NOTE: If form is not valid, this method is not called when 'Continue' button is clicked
async forwardButtonAction() {
this.resetWarningsAndErrors();
this.mainStore.resetBailout();
// Lookup VIN
const vinLookupResponse = await useMainStore().lookupVinByPlate(

View file

@ -176,12 +176,14 @@ export default {
if (this.needToLookupVehicle) {
try {
this.mainStore.resetBailout();
const vehicleLookupResponse = await this.lookupVehicleByVin(this.vin);
if (!vehicleLookupResponse.data.canSafeliteService) {
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId));
this.resetVehicleFromLookup();
showIssLoadingModal(false);
return this.navigateForward();
}
// Add vin bcs the response from the service doesn't contain vin
@ -225,9 +227,6 @@ export default {
let isSelectedGlassAvailableForVehicle = true;
if (this.isCarIdDifferentFromTheStore) {
if (this.mainStore.isBailout) {
return this.navigateForward();
}
isSelectedGlassAvailableForVehicle =
await isGlassAvailableForCarId(this.vehicleFromLookup.carId);
}