diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-01-25 19:05:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-25 19:05:09 +0200 |
commit | ba15526516e1754385d2d6404d64ae9cead3ce95 (patch) | |
tree | 29834be1c70610ea3373e03c64891a6b35569fd1 /models/boards.js | |
parent | 542cc75dc4a4bf392cac72345ab013cf59c67ad3 (diff) | |
parent | 6c3dbc3c6f52a42ddbeeaec9bbfcc82c1c839f7d (diff) | |
download | wekan-ba15526516e1754385d2d6404d64ae9cead3ce95.tar.gz wekan-ba15526516e1754385d2d6404d64ae9cead3ce95.tar.bz2 wekan-ba15526516e1754385d2d6404d64ae9cead3ce95.zip |
Merge pull request #2126 from bentiss/color-swimlanes
Color for swimlanes
Diffstat (limited to 'models/boards.js')
-rw-r--r-- | models/boards.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/models/boards.js b/models/boards.js index 99480ca7..b0f5cecb 100644 --- a/models/boards.js +++ b/models/boards.js @@ -347,10 +347,37 @@ Boards.helpers({ return Lists.find({ boardId: this._id, archived: false }, { sort: { sort: 1 } }); }, + nullSortLists() { + return Lists.find({ + boardId: this._id, + archived: false, + sort: { $eq: null }, + }); + }, + swimlanes() { 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 }, + }); + }, + + nullSortSwimlanes() { + return Swimlanes.find({ + boardId: this._id, + archived: false, + sort: { $eq: null }, + }); + }, + hasOvertimeCards(){ const card = Cards.findOne({isOvertime: true, boardId: this._id, archived: false} ); return card !== undefined; |