diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 16:53:43 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-05 16:53:43 +0200 |
| commit | c6148423fa2ebec86fa8c4c4cfc189b77a3949ec (patch) | |
| tree | 7898c57c5783f90e0881a3778574233ad55d09c9 /app | |
| parent | 5703450887a91e18b592d0b8ce7ea0e87c44088d (diff) | |
sort tasklists
Diffstat (limited to 'app')
| -rw-r--r-- | app/client/dashboard/tasklist.component.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/client/dashboard/tasklist.component.js b/app/client/dashboard/tasklist.component.js index 49fc3fd..b14202f 100644 --- a/app/client/dashboard/tasklist.component.js +++ b/app/client/dashboard/tasklist.component.js @@ -10,7 +10,9 @@ class TaskList extends Component { render(){ const { title, tasks } = this.props let time = 0 - const taskList = tasks.map(task => { + const { mapFn, sortFn } = util.sort.orderByFn('date desc') + const taskList = tasks.map(mapFn).sort(sortFn).map(pair => { + const task = pair[1] let dataset_type, dataset_name if (task.dataset.indexOf('/') !== -1) { [dataset_type, dataset_name] = task.dataset.split('/') |
