diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-01-24 20:45:52 +0100 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-01-24 20:52:03 +0100 |
commit | c075187088e69d30db31489d75b22f991e1972ff (patch) | |
tree | 8740ca004cedfec888df4963cdc0e506023f07f0 /models/boards.js | |
parent | 416b17062e57f215206e93a85b02ef9eb1ab4902 (diff) | |
download | wekan-c075187088e69d30db31489d75b22f991e1972ff.tar.gz wekan-c075187088e69d30db31489d75b22f991e1972ff.tar.bz2 wekan-c075187088e69d30db31489d75b22f991e1972ff.zip |
swimlane: insert the new swimlane after the one we clicked on
Diffstat (limited to 'models/boards.js')
-rw-r--r-- | models/boards.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js index 99480ca7..d92bec47 100644 --- a/models/boards.js +++ b/models/boards.js @@ -351,6 +351,17 @@ Boards.helpers({ return Swimlanes.find({ boardId: this._id, archived: false }, { sort: { sort: 1 } }); }, + nextSwimlane(swimlane) { + return Swimlanes.findOne({ + boardId: this._id, + archived: false, + sort: { $gte: swimlane.sort }, + _id: { $ne: swimlane._id }, + }, { + sort: { sort: 1 }, + }); + }, + hasOvertimeCards(){ const card = Cards.findOne({isOvertime: true, boardId: this._id, archived: false} ); return card !== undefined; |