diff --git a/src/store/index.js b/src/store/index.js index 90065277..25ecd268 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -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()