diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-06-27 23:57:02 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-06-27 23:57:02 +0300 |
commit | 523ebea4dd668976cd0fafea3edf7e9323888d12 (patch) | |
tree | 09f9d46818873ba3bf4f800c5721711fe812133c /models/boards.js | |
parent | ed0ef5b7d348df3fd1671ac44bfc8be41a296514 (diff) | |
parent | bccfa320a96511fc9576cf127e9d28d244a22f3d (diff) | |
download | wekan-523ebea4dd668976cd0fafea3edf7e9323888d12.tar.gz wekan-523ebea4dd668976cd0fafea3edf7e9323888d12.tar.bz2 wekan-523ebea4dd668976cd0fafea3edf7e9323888d12.zip |
Merge branch 'TNick-calendar' into devel
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 911d82a1..3b6c280b 100644 --- a/models/boards.js +++ b/models/boards.js @@ -284,6 +284,33 @@ Boards.helpers({ return Cards.find(query, projection); }, + + cardsInInterval(start, end) { + return Cards.find({ + $or: [ + { + startAt: { + $lte: start, + }, endAt: { + $gte: start, + }, + }, { + startAt: { + $lte: end, + }, endAt: { + $gte: end, + }, + }, { + startAt: { + $gte: start, + }, endAt: { + $lte: end, + }, + }, + ], + }); + }, + }); Boards.mutations({ |