From 5321bafae0916861e270b692a42b3b699a96d339 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 4 Jun 2018 21:43:36 +0200 Subject: task index / queue translation --- app/client/util/sort.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'app/client/util') 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] -- cgit v1.2.3-70-g09d2