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;