Skip to content

Commit

Permalink
Review updates
Browse files Browse the repository at this point in the history
  • Loading branch information
hrazasalman committed Aug 28, 2024
1 parent 7991e0d commit ca25267
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/datatrak-web-server/src/routes/TaskMetricsRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ export class TaskMetricsRoute extends Route<TaskMetricsRequest> {
const overdueTasks = await models.task.count(
{
...baseQuery,
[QUERY_CONJUNCTIONS.RAW]: {
sql: `due_date <= ?`,
parameters: [new Date().getTime()],
due_date: {
comparator: '<=',
comparisonValue: new Date().getTime(),
},
},
baseJoin,
Expand All @@ -48,8 +48,9 @@ export class TaskMetricsRoute extends Route<TaskMetricsRequest> {
// @ts-ignore
{
...baseQuery,
status: TaskStatus.completed,
[QUERY_CONJUNCTIONS.RAW]: {
sql: `(status = 'completed' AND repeat_schedule IS NULL)`,
sql: `repeat_schedule IS NULL`,
},
},
{
Expand Down

0 comments on commit ca25267

Please sign in to comment.