Switch from subtasks to cards in model

This commit is contained in:
Nicu Tofan 2018-06-23 17:40:53 +03:00
parent fd465fbb60
commit adb7f5b2ca
No known key found for this signature in database
GPG key ID: 7EE66E95E64FD0B7

View file

@ -221,15 +221,15 @@ Cards.helpers({
}, },
subtasks() { subtasks() {
return Subtasks.find({cardId: this._id}, {sort: { sort: 1 } }); return Cards.find({parentId: this._id}, {sort: { sort: 1 } });
}, },
subtasksCount() { subtasksCount() {
return Subtasks.find({cardId: this._id}).count(); return Cards.find({parentId: this._id}).count();
}, },
subtasksFinishedCount() { subtasksFinishedCount() {
return Subtasks.find({cardId: this._id, isFinished: true}).count(); return Cards.find({parentId: this._id, archived: true}).count();
}, },
subtasksFinished() { subtasksFinished() {