Merge pull request #345 from Safelite/feature/digital/SSR-533
Only clearing vaps and supporting items if new vehicle selected
This commit is contained in:
commit
3b2237ce74
2 changed files with 7 additions and 5 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue