8144-devToTest_2448 #3216

Merged
alexm merged 256 commits from 8144-devToTest_2448 into test 2024-11-19 07:36:04 +00:00
1 changed files with 11 additions and 2 deletions
Showing only changes of commit 33f1ed360b - Show all commits

View File

@ -96,9 +96,18 @@ module.exports = Self => {
teamMembersId.push(userId);
}
if (args && args.myTeam)
if (args?.myTeam)
args.teamIds = teamIds;
if (args?.to)
args.to.setHours(23, 59, 0, 0);
if (!args.from) {
const yesterday = new Date();
yesterday.setDate(yesterday.getDate() - 1);
args.from = yesterday.toISOString().split('T')[0];
}
const where = buildFilter(args, (param, value) => {
switch (param) {
case 'search':
@ -194,7 +203,7 @@ module.exports = Self => {
`);
stmt.merge(conn.makeWhere(filter.where));
stmt.merge(`GROUP BY id`);
stmt.merge(`GROUP BY o.id`);
stmt.merge(conn.makePagination(filter));
stmts.push(stmt);
stmts.push(`SET SESSION optimizer_search_depth = @_optimizer_search_depth`);