Skip to content
Snippets Groups Projects
Commit f7c06850 authored by Reményi Gergely's avatar Reményi Gergely
Browse files

KST-18: change const vars to consts

parent 3519e0e9
No related branches found
No related tags found
1 merge request!4KST-18: order services
......@@ -90,9 +90,9 @@ export class ServiceListComponent implements OnInit {
return [];
}
services.sort((a, b) => a.isOkay > b.isOkay ? 1 : a.isOkay === b.isOkay ? 0 : -1);
let nameCompare = (a, b) => a.name.localeCompare(b.name, "hu");
let sortedFailingServices = services.filter(s => s.isOkay === false).sort(nameCompare);
let sortedHealthyServices = services.filter(s => s.isOkay === true).sort(nameCompare);
const nameCompare = (a, b) => a.name.localeCompare(b.name, "hu");
const sortedFailingServices = services.filter(s => s.isOkay === false).sort(nameCompare);
const sortedHealthyServices = services.filter(s => s.isOkay === true).sort(nameCompare);
return sortedFailingServices.concat(sortedHealthyServices);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment