changes to ensure vin is saved if moving backward through flow and restarting vin lookup

This commit is contained in:
Kroell 2023-03-13 15:03:40 -04:00
parent d808f8d7f7
commit c282e3bfca

View file

@ -341,6 +341,7 @@ export const useMainStore = defineStore({
// PartsOrQuestions API Actions
async getPartsOrQuestions() {
this.resetGlassPartsState();
const vehicle = this.vehicle;
const damage = this.damage;
const order = this.order;
@ -996,9 +997,10 @@ export const useMainStore = defineStore({
}
//Save new values
this.updateVehicle(vehicleInfo);
this.updateRegistration(registrationInfo);
}
};
this.updateVehicle(vehicleInfo);
},
saveVin({ isSelectedGlassAvailableForVehicle, vehicleInfo }) {
//Reset dependent state when changing
@ -1031,9 +1033,10 @@ export const useMainStore = defineStore({
//Save new values
this.updateVehicle(vehicleInfo);
this.updateRegistration(registrationInfo);
}
},
}
this.updateRegistration(registrationInfo);
},
resetRegistrationAndDependencies() {
this.resetRegistrationState();