Merge pull request #102 from Safelite/add-updateVehicleVin-action

Add updateVehicleVin action and add more properties for updateVehicle action
This commit is contained in:
Johan Gunawan 2023-01-11 09:36:51 -05:00 committed by GitHub
commit d0cf09811f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -358,11 +358,23 @@ export const useMainStore = defineStore({
},
updateVehicle(vehicle) {
// Assuming that the method caller pass all the properties.
// otherwise need to check for undefined for every property.
this.order.vehicle.carId = vehicle.carId;
this.order.vehicle.category = vehicle.category;
this.order.vehicle.year = vehicle.year;
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.imageColor;
this.order.vehicle.imageColor = vehicle.imageVifColor;
},
updateVehicleVin(vin) {
this.order.vehicle.vin = vin;
},
resetVehicleState()