CSR-297 clean up chip count logic

This commit is contained in:
CarlNation 2022-03-07 10:40:05 -05:00
parent acc7adcb4a
commit c952d3f85b

View file

@ -234,13 +234,10 @@ export default {
},
async forwardButtonAction() {
const windshieldChipCount = this.selectedWindshieldOptions.selectedWindshieldChipCount && this.isWindshieldDamageLocation ?
this.selectedWindshieldOptions.selectedWindshieldChipCount[0] : null;
store.commit(this.storeMutations.UPDATE_IS_REPAIR, this.isWindshieldRepair);
if (this.isWindshieldRepair && windshieldChipCount){
store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, parseInt(windshieldChipCount));
if (this.isWindshieldRepair && this.selectedWindshieldOptions.selectedWindshieldChipCount){
store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, parseInt(this.selectedWindshieldOptions.selectedWindshieldChipCount));
} else {
store.commit(this.storeMutations.UPDATE_NUMBER_OF_CHIPS, null);
}