From 435572ecc510d53550683d3730f14bbe38e91273 Mon Sep 17 00:00:00 2001 From: Sneha Date: Mon, 21 Aug 2023 18:09:25 +0530 Subject: [PATCH] Update index.js --- src/store/index.js | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 4345daf01..35b4c266e 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1568,8 +1568,12 @@ export const actions = { // Business domain actions // Vehicle - saveVehicle(context, { year, make, model, style, vehicle }) { - context.dispatch(storeActions.RESET_PARTS_STATE_AND_DEPENDENCIES); + saveVehicle( + context, + { year, make, model, style, carId, category, imageUrl, imageVifNumber, imageVifColor } + ) { + context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES); + context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES); if (context.state.order.vehicle.year !== year) { context.commit(storeMutations.UPDATE_YEAR, year); @@ -1583,11 +1587,11 @@ export const actions = { if (context.state.order.vehicle.style !== style) { context.commit(storeMutations.UPDATE_STYLE, style); } - context.commit(storeMutations.UPDATE_CAR_ID, vehicle.carId); - context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, vehicle.category); - context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, vehicle.imageUrl); - context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, vehicle.imageVifNumber); - context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, vehicle.imageVifColor); + context.commit(storeMutations.UPDATE_CAR_ID, carId); + context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category); + context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl); + context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, imageVifNumber); + context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, imageVifColor); }, saveVehicleDamage(