From acc7adcb4a29194182665269ac5c4d5efdc1e9e6 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Mon, 7 Mar 2022 09:56:31 -0500 Subject: [PATCH] CSR-297 chip count reset in page and not store --- src/layouts/vehicle-damage/vehicle-damage.vue | 4 +++- src/store/index.js | 3 --- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 9a16b7a96..fc684ef63 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -239,8 +239,10 @@ export default { store.commit(this.storeMutations.UPDATE_IS_REPAIR, this.isWindshieldRepair); - if (windshieldChipCount){ + if (this.isWindshieldRepair && windshieldChipCount){ store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, parseInt(windshieldChipCount)); + } else { + store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, null); } store.commit(this.storeMutations.UPDATE_GLASS_TO_REPLACE, this.selectedGlassToReplace()); diff --git a/src/store/index.js b/src/store/index.js index a231dfabb..4b0e06eb4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -68,9 +68,6 @@ export const mutations = { }, updateIsRepair(state, isRepair){ state.order.damage.isRepair = isRepair; - if (!isRepair){ - this.commit(storeMutations.UPDATE_NUMBER_OF_CHIPS, null); - } }, updateNumberOfChips(state, numberOfChips){ state.order.damage.numberOfChips = numberOfChips;