diff options
Diffstat (limited to 'collections')
-rw-r--r-- | collections/cards.js | 6 | ||||
-rw-r--r-- | collections/lists.js | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/collections/cards.js b/collections/cards.js index 538b6af4..374dcbc3 100644 --- a/collections/cards.js +++ b/collections/cards.js @@ -120,9 +120,15 @@ Cards.helpers({ }); return cardLabels; }, + hasLabel: function(labelId) { + return _.contains(this.labelIds, labelId); + }, user: function() { return Users.findOne(this.userId); }, + isAssigned: function(memberId) { + return _.contains(this.members, memberId); + }, activities: function() { return Activities.find({ type: 'card', cardId: this._id }, { sort: { createdAt: -1 }}); diff --git a/collections/lists.js b/collections/lists.js index 196477ec..1a30dbba 100644 --- a/collections/lists.js +++ b/collections/lists.js @@ -44,7 +44,7 @@ if (Meteor.isServer) { Lists.helpers({ cards: function() { - return Cards.find(_.extend(Filter.getMongoSelector(), { + return Cards.find(Filter.mongoSelector({ listId: this._id, archived: false }), { sort: ['sort'] }); |