mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
add: invite user via email, invited user can accept or decline, allow member to quit
This commit is contained in:
parent
d4c5310d65
commit
011f53ad08
11 changed files with 367 additions and 61 deletions
|
|
@ -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');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue