mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 13:28:11 +00:00
sortowanie po liczbie szlaków i ocenie dyżurnego
This commit is contained in:
@@ -11,6 +11,7 @@ export const headIds = [
|
||||
|
||||
export const headIconsIds = [
|
||||
'user',
|
||||
'like',
|
||||
'spawn',
|
||||
'timetableAll',
|
||||
'timetableUnconfirmed',
|
||||
|
||||
@@ -54,12 +54,28 @@ export const sortStations = (
|
||||
diff = (a.onlineInfo?.dispatcherExp || 0) - (b.onlineInfo?.dispatcherExp || 0);
|
||||
break;
|
||||
|
||||
case 'routes-single':
|
||||
diff =
|
||||
(a.generalInfo?.routes.single.length ?? -1) - (b.generalInfo?.routes.single.length ?? -1);
|
||||
break;
|
||||
|
||||
case 'routes-double':
|
||||
diff =
|
||||
(a.generalInfo?.routes.double.length ?? -1) - (b.generalInfo?.routes.double.length ?? -1);
|
||||
break;
|
||||
|
||||
case 'user':
|
||||
diff =
|
||||
(b.onlineInfo ? b.onlineInfo.currentUsers : -1) -
|
||||
(a.onlineInfo ? a.onlineInfo.currentUsers : -1);
|
||||
break;
|
||||
|
||||
case 'like':
|
||||
diff =
|
||||
(b.onlineInfo ? b.onlineInfo.dispatcherRate : -Infinity) -
|
||||
(a.onlineInfo ? a.onlineInfo.dispatcherRate : -Infinity);
|
||||
break;
|
||||
|
||||
case 'spawn':
|
||||
diff =
|
||||
(a.onlineInfo ? a.onlineInfo.spawns.length : -1) -
|
||||
|
||||
Reference in New Issue
Block a user