diff --git a/src/store/index.js b/src/store/index.js index 711d736f..4b6ac5b6 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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();