Add template search in Add Card menu

Archive all cards in list when list is archived
Remove default board in link popup
Only list non-template boards in card link and search
This commit is contained in:
Andrés Manelli 2019-02-23 15:32:44 +01:00
parent 1e72177991
commit 7a6afb8aea
5 changed files with 57 additions and 31 deletions

View file

@ -195,10 +195,23 @@ Lists.mutations({
},
archive() {
Cards.find({
listId: this._id,
archived: false,
}).forEach((card) => {
return card.archive();
});
return { $set: { archived: true } };
},
restore() {
cardsToRestore = Cards.find({
listId: this._id,
archived: true,
});
cardsToRestore.forEach((card) => {
card.restore();
});
return { $set: { archived: false } };
},