Show cards in calendar

This commit is contained in:
Nicu Tofan 2018-06-26 22:11:51 +03:00
parent 226d25ca94
commit 18467dfe40
No known key found for this signature in database
GPG key ID: 7EE66E95E64FD0B7
5 changed files with 87 additions and 1 deletions

View file

@ -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({