Skip to content

Commit

Permalink
Update TasksRoute.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
tcaiger committed Jul 18, 2024
1 parent fd556ca commit 48b5567
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions packages/datatrak-web-server/src/routes/TasksRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,11 @@ export class TasksRoute extends Route<TasksRequest> {

this.formatFilters();
await this.processFilterSettings();
console.log(' ---- SORT ----', sort);

// If no sort is provided, default to sorting completed and cancelled tasks to the bottom and by due date
const rawSort =
!sort &&
"CASE status WHEN 'completed' THEN 1 WHEN 'cancelled' THEN 2 ELSE 0 END ASC, due_date ASC";

console.log(' ---- raw sort ----', rawSort);
const tasks = await ctx.services.central.fetchResources('tasks', {
filter: this.filters,
columns: FIELDS,
Expand Down

0 comments on commit 48b5567

Please sign in to comment.