Add checklist feature

This commit is contained in:
lksime 2017-01-20 21:05:48 +08:00
parent 38c143b8bf
commit 59731af139
15 changed files with 462 additions and 2 deletions

View file

@ -35,6 +35,9 @@ Activities.helpers({
attachment() {
return Attachments.findOne(this.attachmentId);
},
checklist() {
return Checklists.findOne(this.checklistId);
},
});
Activities.before.insert((userId, doc) => {
@ -102,6 +105,10 @@ if (Meteor.isServer) {
const attachment = activity.attachment();
params.attachment = attachment._id;
}
if (activity.checklistId) {
const checklist = activity.checklist();
params.checklist = checklist.title;
}
if (board) {
const watchingUsers = _.pluck(_.where(board.watchers, {level: 'watching'}), 'userId');
const trackingUsers = _.pluck(_.where(board.watchers, {level: 'tracking'}), 'userId');