From 33f3a7676eab8fb05b98741c09af2a9bd4a4286a Mon Sep 17 00:00:00 2001 From: Sneha Date: Fri, 22 Sep 2023 16:38:48 +0530 Subject: [PATCH] CSR-1661 --- src/store/index.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index f6f773cfc..7ca6e5889 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1594,18 +1594,27 @@ export const actions = { context.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES); context.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES); - if (context.state.order.vehicle.year !== year) { + if ( + context.state.order.vehicle.year != year || + context.state.order.vehicle.make != make || + context.state.order.vehicle.model != model || + context.state.order.vehicle.style != style + ) + context.commit(storeMutations.UPDATE_VEHICLE_VIN, null); + + if (context.state.order.vehicle.year != year) { context.commit(storeMutations.UPDATE_YEAR, year); } - if (context.state.order.vehicle.make !== make) { + if (context.state.order.vehicle.make != make) { context.commit(storeMutations.UPDATE_MAKE, make); } - if (context.state.order.vehicle.model !== model) { + if (context.state.order.vehicle.model != model) { context.commit(storeMutations.UPDATE_MODEL, model); } - if (context.state.order.vehicle.style !== style) { + if (context.state.order.vehicle.style != style) { context.commit(storeMutations.UPDATE_STYLE, style); } + context.commit(storeMutations.UPDATE_CAR_ID, carId); context.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, category); context.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, imageUrl);