reset heavy truck bailout before looking up a new vehicle
This commit is contained in:
parent
2e4bfaaab6
commit
cd4cf33db5
3 changed files with 4 additions and 4 deletions
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue