Improve reimbursement lists #222
@@ -10,6 +10,18 @@ export default class ReimbursementItemComponent extends Component {
|
||||
return config.ipfs.gatewayUrl;
|
||||
}
|
||||
|
||||
get isConfirmed () {
|
||||
return (this.args.reimbursement.confirmedAt - this.kredits.currentBlock) <= 0;
|
||||
}
|
||||
|
||||
get isUnconfirmed () {
|
||||
return !this.isConfirmed;
|
||||
}
|
||||
|
||||
get showVetoButton () {
|
||||
return this.isUnconfirmed && this.kredits.currentUserIsCore;
|
||||
}
|
||||
|
||||
@action
|
||||
veto (id) {
|
||||
this.kredits.vetoReimbursement(id).then(transaction => {
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
class="button small" target="_blank" rel="noopener noreferrer">
|
||||
Inspect IPFS data
|
||||
</a>
|
||||
{{#if this.kredits.currentUserIsCore}}
|
||||
{{#if this.showVetoButton}}
|
||||
<button {{on "click" (fn this.veto @reimbursement.id)}}
|
||||
disabled={{@reimbursement.vetoed}}
|
||||
class="button small danger" type="button">veto</button>
|
||||
|
||||
Reference in New Issue
Block a user