We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57b3f5b commit 00f933eCopy full SHA for 00f933e
webapp/src/ts/reducers/tasks.ts
@@ -14,35 +14,6 @@ const initialState = {
14
},
15
};
16
17
-
18
-const orderByDueDateAndPriority1 = (t1, t2) => {
19
- const lhs = t1?.dueDate;
20
- const rhs = t2?.dueDate;
21
22
- const lhsPriority = t1?.priority;
23
- const rhsPriority = t2?.priority;
24
25
- if ((lhsPriority && !rhsPriority) || lhsPriority > rhsPriority) {
26
- return -1;
27
- }
28
29
- if ((!lhsPriority && rhsPriority) || lhsPriority < rhsPriority) {
30
- return 1;
31
32
33
- if (!lhs && !rhs) {
34
- return 0;
35
36
- if (!lhs) {
37
38
39
- if (!rhs) {
40
41
42
43
- return lhs < rhs ? -1 : 1;
44
-};
45
46
/**
47
* Task prioritization algorithm that combines:
48
* 1. Overdue status (most urgent)
0 commit comments