add linkedBoard Activities to selector

This commit is contained in:
Ben0it-T 2022-03-05 22:03:41 +01:00
parent d52e0bcb6e
commit bf6bfc8ed6
3 changed files with 26 additions and 4 deletions

View file

@ -773,7 +773,15 @@ Boards.helpers({
},
activities() {
return Activities.find({ boardId: this._id }, { sort: { createdAt: -1 } });
let linkedBoardId = [this._id];
Cards.find({
"type": "cardType-linkedBoard",
"boardId": this._id}
).forEach(card => {
linkedBoardId.push(card.linkedId);
});
return Activities.find({ boardId: { $in: linkedBoardId } }, { sort: { createdAt: -1 } });
//return Activities.find({ boardId: this._id }, { sort: { createdAt: -1 } });
},
activeMembers(){