Sort workers by completed tasks in UI

This commit is contained in:
simon987 2019-04-06 12:46:38 -04:00
parent fe7d684761
commit a0650a89cc

View File

@ -56,6 +56,8 @@ export class WorkerDashboardComponent implements OnInit {
private updateChart(data) {
data = data.sort((a, b) => b.closed_task_count - a.closed_task_count);
this.chart.data.labels = data.map(w => w.alias);
this.chart.data.datasets = [{
data: data.map(w => w.closed_task_count),