mirror of
https://github.com/wekan/wekan.git
synced 2026-01-04 16:48:49 +01:00
remove feature
This commit is contained in:
parent
6933424fca
commit
8137f2692f
10 changed files with 135 additions and 14 deletions
|
|
@ -217,6 +217,10 @@ Lists.helpers({
|
|||
isTemplateList() {
|
||||
return this.type === 'template-list';
|
||||
},
|
||||
|
||||
remove() {
|
||||
Lists.remove({ _id: this._id});
|
||||
},
|
||||
});
|
||||
|
||||
Lists.mutations({
|
||||
|
|
@ -310,6 +314,12 @@ if (Meteor.isServer) {
|
|||
});
|
||||
|
||||
Lists.before.remove((userId, doc) => {
|
||||
const cards = Cards.find({ listId: doc._id });
|
||||
if (cards) {
|
||||
cards.forEach((card) => {
|
||||
Cards.remove(card._id);
|
||||
});
|
||||
}
|
||||
Activities.insert({
|
||||
userId,
|
||||
type: 'list',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue