diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-04 21:43:36 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-04 21:43:36 +0200 |
| commit | 5321bafae0916861e270b692a42b3b699a96d339 (patch) | |
| tree | 9137cd8ff869b623bb257a22f29223a2af661a44 /app/client/util | |
| parent | 55a5504ab1271bb5cdc3d7d7df5df853b0161148 (diff) | |
task index / queue translation
Diffstat (limited to 'app/client/util')
| -rw-r--r-- | app/client/util/sort.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/client/util/sort.js b/app/client/util/sort.js index 78f17a0..4c07a96 100644 --- a/app/client/util/sort.js +++ b/app/client/util/sort.js @@ -22,6 +22,9 @@ export const orderByFn = (s='name asc') => { mapFn = a => [+new Date(a.date || a.created_at), a] sortFn = numericSort[direction] break + case 'priority': + mapFn = a => [parseInt(a.priority) || parseInt(a.id) || 1000, a] + sortFn = numericSort[direction] case 'name': default: mapFn = a => [a.name || "", a] |
