From d082b484e6c83c0ba0082a76a00a0a5e5e7519e7 Mon Sep 17 00:00:00 2001 From: Katie Date: Tue, 17 May 2022 10:22:24 -0400 Subject: [PATCH] CSR-592 Clear VIN and image information if user goes back --- src/layouts/vehicle-make/vehicle-make.vue | 4 ++++ src/layouts/vehicle-model/vehicle-model.vue | 4 ++++ src/layouts/vehicle-style/vehicle-style.vue | 4 ++++ src/layouts/vehicle-year/vehicle-year.vue | 5 ++++- src/store/index.js | 4 ++++ 5 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/layouts/vehicle-make/vehicle-make.vue b/src/layouts/vehicle-make/vehicle-make.vue index 9e75d7036..aecd90a6f 100644 --- a/src/layouts/vehicle-make/vehicle-make.vue +++ b/src/layouts/vehicle-make/vehicle-make.vue @@ -88,6 +88,10 @@ export default { store.commit(storeMutations.UPDATE_STYLE, null); store.commit(storeMutations.UPDATE_CAR_ID, null); store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null); + store.commit(storeMutations.UPDATE_VEHICLE_VIN, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null); // Invokes store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES); diff --git a/src/layouts/vehicle-model/vehicle-model.vue b/src/layouts/vehicle-model/vehicle-model.vue index 66516a729..c661c824e 100644 --- a/src/layouts/vehicle-model/vehicle-model.vue +++ b/src/layouts/vehicle-model/vehicle-model.vue @@ -88,6 +88,10 @@ export default { store.commit(storeMutations.UPDATE_STYLE, null); store.commit(storeMutations.UPDATE_CAR_ID, null); store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null); + store.commit(storeMutations.UPDATE_VEHICLE_VIN, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null); // Invokes store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES); diff --git a/src/layouts/vehicle-style/vehicle-style.vue b/src/layouts/vehicle-style/vehicle-style.vue index 4f756b600..d2fc51924 100644 --- a/src/layouts/vehicle-style/vehicle-style.vue +++ b/src/layouts/vehicle-style/vehicle-style.vue @@ -101,6 +101,10 @@ export default { store.commit(storeMutations.UPDATE_IS_REPAIR, null); store.commit(storeMutations.UPDATE_NUMBER_OF_CHIPS, null); store.commit(storeMutations.UPDATE_GLASS_TO_REPLACE, []); + store.commit(storeMutations.UPDATE_VEHICLE_VIN, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null); }, }, diff --git a/src/layouts/vehicle-year/vehicle-year.vue b/src/layouts/vehicle-year/vehicle-year.vue index ddca6b8bd..1041f82ae 100644 --- a/src/layouts/vehicle-year/vehicle-year.vue +++ b/src/layouts/vehicle-year/vehicle-year.vue @@ -107,8 +107,11 @@ export default { store.commit(storeMutations.UPDATE_STYLE, null); store.commit(storeMutations.UPDATE_CAR_ID, null); store.commit(storeMutations.UPDATE_VEHICLE_CATEGORY, null); + store.commit(storeMutations.UPDATE_VEHICLE_VIN, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_URL, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_VIF_NUMBER, null); + store.commit(storeMutations.UPDATE_VEHICLE_IMAGE_COLOR, null); - // Invokes store.dispatch(storeActions.RESET_DAMAGE_STATE_AND_DEPENDENCIES); store.dispatch(storeActions.RESET_REGISTRATION_STATE_AND_DEPENDENCIES); diff --git a/src/store/index.js b/src/store/index.js index 69f6c2ba0..ce6ca8dae 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -190,6 +190,10 @@ export const mutations = { state.order.vehicle.style = null; state.order.vehicle.carId = null; state.order.vehicle.category = null; + state.order.vehicle.vin = null; + state.order.vehicle.imageUrl = null; + state.order.vehicle.imageVifNumber = null; + state.order.vehicle.imageColor = null; }, resetDamageState(state) { state.order.damage.isRepair = null;