Explorar el Código

Switch from subtasks to cards in model

Nicu Tofan hace 7 años
padre
commit
adb7f5b2ca
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      models/cards.js

+ 3 - 3
models/cards.js

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