import Component from '@glimmer/component'; import { sort } from '@ember/object/computed'; import { action } from '@ember/object'; import { inject as service } from '@ember/service'; import config from 'kredits-web/config/environment'; export default class ReimbursementListComponent extends Component { @service kredits; itemSorting = Object.freeze(['pendingStatus:asc', 'id:desc']); @sort('args.items', 'itemSorting') itemsSorted; get ipfsGatewayUrl () { return config.ipfs.gatewayUrl; } @action veto (id) { this.kredits.vetoReimbursement(id).then(transaction => { console.debug('[controllers:budget] Veto submitted to chain: '+transaction.hash); }); } }