Active angels page: Fix fa angels sorting

This commit is contained in:
Igor Scheller 2024-03-29 14:31:59 +01:00
parent c82e902360
commit fcf23d3824
1 changed files with 9 additions and 9 deletions

View File

@ -85,14 +85,14 @@ function admin_active()
->whereNotNull('users_state.user_info')
->whereNot('users_state.user_info', '');
})
->groupBy('users.id')
->orderByDesc('shift_length')
->orderByDesc('name')
->limit($count);
->groupBy('users.id');
if (config('enable_force_active')) {
$query->orderByDesc('force_active');
}
$query
->orderByDesc('shift_length')
->orderByDesc('name')
->limit($count);
$users = $query->get();
$user_nicks = [];
@ -195,13 +195,13 @@ function admin_active()
->whereNotNull('users_state.user_info')
->whereNot('users_state.user_info', '');
})
->groupBy('users.id')
->orderByDesc('shift_length')
->orderByDesc('name');
->groupBy('users.id');
if (config('enable_force_active')) {
$query->orderByDesc('force_active');
}
$query
->orderByDesc('shift_length')
->orderByDesc('name');
if (!is_null($count)) {
$query->limit($count);