Allow to veto reimbursements

This commit is contained in:
Râu Cao
2022-12-30 22:26:32 +07:00
parent ca1ccf6d93
commit c7eb81450c
4 changed files with 50 additions and 10 deletions
@@ -1,7 +1,18 @@
import Component from '@glimmer/component';
import { sort } from '@ember/object/computed';
import { action } from '@ember/object';
import { inject as service } from '@ember/service';
export default class ReimbursementListComponent extends Component {
@service kredits;
itemSorting = Object.freeze(['pendingStatus:asc', 'id:desc']);
@sort('args.items', 'itemSorting') itemsSorted;
@action
veto (id) {
this.kredits.vetoReimbursement(id).then(transaction => {
console.debug('[controllers:budget] Veto submitted to chain: '+transaction.hash);
});
}
}