Merge pull request #777 from Safelite/defect/digital/SSR-1348
SSR-1348 Don't overwrite vin for same vehicle
This commit is contained in:
commit
1cae398344
1 changed files with 8 additions and 3 deletions
|
|
@ -1738,8 +1738,14 @@ export const useMainStore = defineStore({
|
|||
},
|
||||
|
||||
updateVehicle(vehicle) {
|
||||
// Assuming that the method caller pass all the properties.
|
||||
// otherwise need to check for undefined for every property.
|
||||
// Assuming that the method caller pass all the properties.
|
||||
// otherwise need to check for undefined for every property.
|
||||
if (this.order.vehicle.carId !== vehicle.carId
|
||||
|| (!this.order.vehicle.vin && vehicle.vin)
|
||||
|| (this.order.vehicle.vin && vehicle.vin && this.order.vehicle.vin !== vehicle.vin)) {
|
||||
this.order.vehicle.vin = vehicle.vin;
|
||||
}
|
||||
|
||||
this.order.vehicle.policyVehicleId = vehicle.policyVehicleId;
|
||||
this.order.vehicle.carId = vehicle.carId;
|
||||
this.order.vehicle.category = vehicle.category;
|
||||
|
|
@ -1747,7 +1753,6 @@ export const useMainStore = defineStore({
|
|||
this.order.vehicle.make = vehicle.make;
|
||||
this.order.vehicle.model = vehicle.model;
|
||||
this.order.vehicle.style = vehicle.style;
|
||||
this.order.vehicle.vin = vehicle.vin;
|
||||
this.order.vehicle.imageUrl = vehicle.imageUrl;
|
||||
this.order.vehicle.imageVifNumber = vehicle.imageVifNumber;
|
||||
this.order.vehicle.imageColor = vehicle.imageVifColor;
|
||||
|
|
|
|||
Loading…
Reference in a new issue