summaryrefslogtreecommitdiffstats
path: root/client/components/boards/boardsList.js
diff options
context:
space:
mode:
authorfloatinghotpot <rjfun.mobile@gmail.com>2015-12-07 11:15:57 +0800
committerfloatinghotpot <rjfun.mobile@gmail.com>2015-12-07 11:15:57 +0800
commit011f53ad0828c0979d15e232abf501180c741288 (patch)
tree41330fe4e47c443dd9fefd0493f30a186e4c4999 /client/components/boards/boardsList.js
parentd4c5310d65cbdfbd002288d33eba429ace33bc3c (diff)
downloadwekan-011f53ad0828c0979d15e232abf501180c741288.tar.gz
wekan-011f53ad0828c0979d15e232abf501180c741288.tar.bz2
wekan-011f53ad0828c0979d15e232abf501180c741288.zip
add: invite user via email, invited user can accept or decline, allow member to quit
Diffstat (limited to 'client/components/boards/boardsList.js')
-rw-r--r--client/components/boards/boardsList.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/client/components/boards/boardsList.js b/client/components/boards/boardsList.js
index 1a2d3c9a..131adf9d 100644
--- a/client/components/boards/boardsList.js
+++ b/client/components/boards/boardsList.js
@@ -17,6 +17,11 @@ BlazeComponent.extendComponent({
return user && user.hasStarred(this.currentData()._id);
},
+ isInvited() {
+ const user = Meteor.user();
+ return user && user.isInvitedTo(this.currentData()._id);
+ },
+
events() {
return [{
'click .js-add-board': Popup.open('createBoard'),
@@ -25,6 +30,19 @@ BlazeComponent.extendComponent({
Meteor.user().toggleBoardStar(boardId);
evt.preventDefault();
},
+ 'click .js-accept-invite'() {
+ const boardId = this.currentData()._id;
+ Meteor.user().removeInvite(boardId);
+ },
+ 'click .js-decline-invite'() {
+ const boardId = this.currentData()._id;
+ Meteor.call('quitBoard', boardId, (err, ret) => {
+ if (!err && ret) {
+ Meteor.user().removeInvite(boardId);
+ FlowRouter.go('home');
+ }
+ });
+ },
}];
},
}).register('boardList');