summaryrefslogtreecommitdiffstats
path: root/models/swimlanes.js
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2019-02-23 01:40:11 +0100
committerAndrés Manelli <andresmanelli@gmail.com>2019-02-24 00:05:00 +0100
commitcdf070189e11205eecd11641226ae62964cc03e1 (patch)
treea5f0d59fa0a7cb117f3a6b63c2fe8b229b055f7b /models/swimlanes.js
parent64bf455b296a10369e8318183c2c6cd61a122869 (diff)
downloadwekan-cdf070189e11205eecd11641226ae62964cc03e1.tar.gz
wekan-cdf070189e11205eecd11641226ae62964cc03e1.tar.bz2
wekan-cdf070189e11205eecd11641226ae62964cc03e1.zip
Remove links from templates board for the moment
Insert the correct template type in templates board Allow independant lists in templates board Add some helpers
Diffstat (limited to 'models/swimlanes.js')
-rw-r--r--models/swimlanes.js22
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({