diff options
author | Andrés Manelli <andresmanelli@gmail.com> | 2018-03-20 00:40:24 -0300 |
---|---|---|
committer | Andrés Manelli <andresmanelli@gmail.com> | 2018-08-10 23:55:19 +0200 |
commit | 061a13e46e41f2bfed76860fadd96737caa8e0d0 (patch) | |
tree | 2419eb632102a575c8ab0f4b3180f72992b92adb /client/components/lists/listBody.js | |
parent | dcc7b2970f3635b95bc71e3fc163a51cacad0931 (diff) | |
download | wekan-061a13e46e41f2bfed76860fadd96737caa8e0d0.tar.gz wekan-061a13e46e41f2bfed76860fadd96737caa8e0d0.tar.bz2 wekan-061a13e46e41f2bfed76860fadd96737caa8e0d0.zip |
Avoid showing current board
Diffstat (limited to 'client/components/lists/listBody.js')
-rw-r--r-- | client/components/lists/listBody.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/client/components/lists/listBody.js b/client/components/lists/listBody.js index 4cae9f0b..1aece121 100644 --- a/client/components/lists/listBody.js +++ b/client/components/lists/listBody.js @@ -338,8 +338,13 @@ BlazeComponent.extendComponent({ }, onCreated() { - subManager.subscribe('board', Session.get('currentBoard')); - this.selectedBoardId = new ReactiveVar(Session.get('currentBoard')); + const boardId = Boards.findOne({ + archived: false, + 'members.userId': Meteor.userId(), + _id: {$ne: Session.get('currentBoard')}, + })._id; + subManager.subscribe('board', boardId); + this.selectedBoardId = new ReactiveVar(boardId); this.term = new ReactiveVar(''); }, @@ -347,6 +352,7 @@ BlazeComponent.extendComponent({ const boards = Boards.find({ archived: false, 'members.userId': Meteor.userId(), + _id: {$ne: Session.get('currentBoard')}, }, { sort: ['title'], }); @@ -368,7 +374,7 @@ BlazeComponent.extendComponent({ evt.preventDefault(); this.term.set(evt.target.searchTerm.value); }, - 'click .js-minicard'() { + 'click .js-minicard'(evt) { // IMPORT CARD }, }]; |