diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 40d3bd92..bb58ee99 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -233,7 +233,7 @@ export default { isSelectedGlassAvailableForVehicle: this.isSelectedGlassAvailableForVehicle, vehicleInfo: Object.keys(vehicleInfoToCommit).length === 0 - ? useMainStore().order.vehicle + ? null : vehicleInfoToCommit, registrationInfo: { firstName: this.customerQuestions.firstName, diff --git a/src/store/index.js b/src/store/index.js index 1a300bcb..535bf224 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1158,9 +1158,7 @@ export const useMainStore = defineStore({ registrationInfo?.firstName !== this.order.vehicle.registration?.firstName || registrationInfo?.lastName !== this.order.vehicle.registration?.lastName ) - { - this.resetRegistrationAndDependencies(); - + { if (!isSelectedGlassAvailableForVehicle) { this.resetDamageState(); this.resetGlassPartsState(); @@ -1170,7 +1168,11 @@ export const useMainStore = defineStore({ this.updateRegistration(registrationInfo); }; - this.updateVehicle(vehicleInfo); + if(vehicleInfo) + { + this.updateVehicle(vehicleInfo); + } + }, saveVin({ isSelectedGlassAvailableForVehicle, vehicleInfo }) { //Reset dependent state when changing