KainosSoftwareLtd / project-dashboard

Digital Project Dashboard.
MIT License
1 stars 1 forks source link

Row Order is not reflected by landing page #64

Closed Rory80Hz closed 7 years ago

Rory80Hz commented 7 years ago

On specifying an order when grouping by health:

var health_order = [ 'unknown', 'risk', 'fair', 'good' ];

passing this to the following function in routes.js should guarantee order:

controller.setupIndexPageRoute(healthGroupFunc, '/health', health_order, 'health');

However, the sorting function in controller.js does not actually sort by the row_order, it simply sorts the list alphabetically.

function prepareRowOrder(rowOrder, data) { rowOrder = []; _.each(data, function(value, key, list) { rowOrder.push(key); }); rowOrder.sort();

return rowOrder;

}