()
| 18 | |
| 19 | //submit budget method |
| 20 | submitBudgetForm(){ |
| 21 | const value = this.budgetInput.value; |
| 22 | if(value === '' || value < 0){ |
| 23 | this.budgetFeedback.classList.add('showItem'); |
| 24 | this.budgetFeedback.innerHTML = `<p>value cannot be empty or negative</p>`; |
| 25 | const self = this; |
| 26 | setTimeout(function(){ |
| 27 | self.budgetFeedback.classList.remove('showItem'); |
| 28 | }, 3000); |
| 29 | } else { |
| 30 | this.budgetAmount.textContent = value; |
| 31 | this.budgetInput.value = ''; |
| 32 | this.showBalance(); |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | //show balance |
| 37 | showBalance(){ |
no test coverage detected