Remove expense item from list

This commit is contained in:
2020-09-29 17:36:50 +02:00
parent e4d2fdfce4
commit 7c86edcaaa
2 changed files with 10 additions and 1 deletions
@@ -36,6 +36,15 @@ export default class AddReimbursementComponent extends Component {
this.expenseFormVisible = false;
}
@action
removeExpenseItem (expenseItem) {
this.expenses.removeObject(expenseItem);
if (this.expenses.length === 0) {
this.expenseFormVisible = true;
}
}
@action
submit (e) {
e.preventDefault();