CSR-78
This commit is contained in:
parent
4e91469bf2
commit
26a8eaa99a
2 changed files with 15 additions and 0 deletions
|
|
@ -7,6 +7,9 @@ const storeMutations = {
|
|||
UPDATE_STYLE: "updateStyle",
|
||||
UPDATE_CAR_ID: "updateCarId",
|
||||
UPDATE_VEHICLE_CATEGORY: "updateVehicleCategory",
|
||||
UPDATE_VEHICLE_IMAGE_URL: "updateVehicleImageUrl",
|
||||
UPDATE_VEHICLE_IMAGE_VIF_NUMBER: "updateVehicleImageVifNumber",
|
||||
UPDATE_VEHICLE_IMAGE_COLOR: "updateVehicleImageColor",
|
||||
|
||||
// EVENT BUS MUTATIONS
|
||||
ADD_EVENT_TO_BUS: "addEventToBus",
|
||||
|
|
|
|||
|
|
@ -52,6 +52,15 @@ export const mutations = {
|
|||
updateVehicleCategory(state, category) {
|
||||
state.order.vehicle.category = category;
|
||||
},
|
||||
updateVehicleImageUrl(state, imageUrl) {
|
||||
state.order.vehicle.imageUrl = imageUrl;
|
||||
},
|
||||
updateVehicleImageVifNumber(state, imageVifNumber) {
|
||||
state.order.vehicle.imageVifNumber = imageVifNumber;
|
||||
},
|
||||
updateVehicleImageColor(state, imageColor) {
|
||||
state.order.vehicle.imageColor = imageColor;
|
||||
},
|
||||
|
||||
// EVENT BUS MUTATIONS
|
||||
addEventToBus(state, event) {
|
||||
|
|
@ -168,6 +177,9 @@ export const actions = {
|
|||
.then((response) => {
|
||||
context.commit(storeMutations.UPDATE_CAR_ID, response.data.carId);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, response.data.category);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, response.data.imageUrl);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, response.data.imageVifNumber);
|
||||
context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, response.data.imageVifColor);
|
||||
return response;
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue