diff options
Diffstat (limited to 'models/swimlanes.js')
-rw-r--r-- | models/swimlanes.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/models/swimlanes.js b/models/swimlanes.js index 185422ce..9d4e16de 100644 --- a/models/swimlanes.js +++ b/models/swimlanes.js @@ -108,6 +108,13 @@ Swimlanes.helpers({ }), { sort: ['sort'] }); }, + lists() { + return Lists.find(Filter.mongoSelector({ + swimlaneId: this._id, + archived: false, + }), { sort: ['sort'] }); + }, + allCards() { return Cards.find({ swimlaneId: this._id }); }, @@ -129,6 +136,21 @@ Swimlanes.helpers({ isTemplateContainer() { return this.type === 'template-container'; }, + + isListTemplatesSwimlane() { + const user = Users.findOne(Meteor.userId()); + return user.profile.listTemplatesSwimlaneId === this._id; + }, + + isCardTemplatesSwimlane() { + const user = Users.findOne(Meteor.userId()); + return user.profile.cardTemplatesSwimlaneId === this._id; + }, + + isBoardTemplatesSwimlane() { + const user = Users.findOne(Meteor.userId()); + return user.profile.boardsTemplatesSwimlaneId === this._id; + }, }); Swimlanes.mutations({ |