Only show conributors with Kredits in list

This commit is contained in:
2017-05-14 16:16:12 +02:00
parent 8d07c7d741
commit d7aaadea2b
2 changed files with 45 additions and 11 deletions
+7 -1
View File
@@ -43,8 +43,14 @@ export default Ember.Controller.extend({
proposalsClosedSorted: Ember.computed.sort('proposalsClosed', 'proposalsSorting'),
proposalsOpenSorted: Ember.computed.sort('proposalsOpen', 'proposalsSorting'),
contributorsWithKredits: function() {
return this.get('model.contributors').filter(c => {
return c.get('kredits') !== 0;
});
}.property('model.contributors.[]'),
contributorsSorting: ['kredits:desc'],
contributorsSorted: Ember.computed.sort('model.contributors', 'contributorsSorting'),
contributorsSorted: Ember.computed.sort('contributorsWithKredits', 'contributorsSorting'),
watchContractEvents: function() {
let events = this.get('kredits.kreditsContract')