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() {
|
async forwardButtonAction() {
|
||||||
this.resetWarningsAndErrors();
|
this.resetWarningsAndErrors();
|
||||||
|
this.mainStore.resetBailout();
|
||||||
|
|
||||||
// Vehicle info change in the flow, use a variable to keep track and commit to state at the end.
|
// Vehicle info change in the flow, use a variable to keep track and commit to state at the end.
|
||||||
let vehicleInfoToCommit = {};
|
let vehicleInfoToCommit = {};
|
||||||
|
|
@ -361,7 +362,6 @@ export default {
|
||||||
this.displayVinNotFoundAlert = false;
|
this.displayVinNotFoundAlert = false;
|
||||||
this.displayMatchedDifferentVehicleAlert = false;
|
this.displayMatchedDifferentVehicleAlert = false;
|
||||||
this.displayVinLookupByHomeAddressNotAllowedAlert = false;
|
this.displayVinLookupByHomeAddressNotAllowedAlert = false;
|
||||||
this.displayNoServiceAlert = false;
|
|
||||||
this.$refs.siteFooter.enableForwardAction();
|
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
|
// NOTE: If form is not valid, this method is not called when 'Continue' button is clicked
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
this.resetWarningsAndErrors();
|
this.resetWarningsAndErrors();
|
||||||
|
this.mainStore.resetBailout();
|
||||||
|
|
||||||
// Lookup VIN
|
// Lookup VIN
|
||||||
const vinLookupResponse = await useMainStore().lookupVinByPlate(
|
const vinLookupResponse = await useMainStore().lookupVinByPlate(
|
||||||
|
|
|
||||||
|
|
@ -176,12 +176,14 @@ export default {
|
||||||
|
|
||||||
if (this.needToLookupVehicle) {
|
if (this.needToLookupVehicle) {
|
||||||
try {
|
try {
|
||||||
|
this.mainStore.resetBailout();
|
||||||
const vehicleLookupResponse = await this.lookupVehicleByVin(this.vin);
|
const vehicleLookupResponse = await this.lookupVehicleByVin(this.vin);
|
||||||
|
|
||||||
if (!vehicleLookupResponse.data.canSafeliteService) {
|
if (!vehicleLookupResponse.data.canSafeliteService) {
|
||||||
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId));
|
this.mainStore.setBailout(bailoutMessage.HeavyTruckVehicle(vehicleLookupResponse.data.carId));
|
||||||
this.resetVehicleFromLookup();
|
this.resetVehicleFromLookup();
|
||||||
showIssLoadingModal(false);
|
showIssLoadingModal(false);
|
||||||
|
return this.navigateForward();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add vin bcs the response from the service doesn't contain vin
|
// Add vin bcs the response from the service doesn't contain vin
|
||||||
|
|
@ -225,9 +227,6 @@ export default {
|
||||||
|
|
||||||
let isSelectedGlassAvailableForVehicle = true;
|
let isSelectedGlassAvailableForVehicle = true;
|
||||||
if (this.isCarIdDifferentFromTheStore) {
|
if (this.isCarIdDifferentFromTheStore) {
|
||||||
if (this.mainStore.isBailout) {
|
|
||||||
return this.navigateForward();
|
|
||||||
}
|
|
||||||
isSelectedGlassAvailableForVehicle =
|
isSelectedGlassAvailableForVehicle =
|
||||||
await isGlassAvailableForCarId(this.vehicleFromLookup.carId);
|
await isGlassAvailableForCarId(this.vehicleFromLookup.carId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue