User overview: Order by planned arrival/departure dates
This commit is contained in:
parent
54536d146c
commit
d794efe7bd
|
@ -277,6 +277,8 @@ function users_list_controller()
|
|||
'active',
|
||||
'force_active',
|
||||
'got_shirt',
|
||||
'planned_arrival_date',
|
||||
'planned_departure_date',
|
||||
'last_login_at',
|
||||
])) {
|
||||
$order_by = $request->input('OrderBy');
|
||||
|
|
|
@ -232,6 +232,10 @@ function Users_view(
|
|||
$u['force_active'] = glyph_bool($user->state->force_active);
|
||||
$u['got_shirt'] = glyph_bool($user->state->got_shirt);
|
||||
$u['shirt_size'] = $user->personalData->shirt_size;
|
||||
$u['arrival_date'] = $user->personalData->planned_arrival_date
|
||||
? $user->personalData->planned_arrival_date->format(__('m/d/Y h:i a')) : '';
|
||||
$u['departure_date'] = $user->personalData->planned_departure_date
|
||||
? $user->personalData->planned_departure_date->format(__('m/d/Y h:i a')) : '';
|
||||
$u['last_login_at'] = $user->last_login_at ? $user->last_login_at->format(__('m/d/Y h:i a')) : '';
|
||||
$u['actions'] = table_buttons([
|
||||
button_glyph(page_link_to('admin_user', ['id' => $user->id]), 'edit', 'btn-xs')
|
||||
|
@ -266,6 +270,8 @@ function Users_view(
|
|||
'force_active' => Users_table_header_link('force_active', __('Forced'), $order_by),
|
||||
'got_shirt' => Users_table_header_link('got_shirt', __('T-Shirt'), $order_by),
|
||||
'shirt_size' => Users_table_header_link('shirt_size', __('Size'), $order_by),
|
||||
'arrival_date' => Users_table_header_link('planned_arrival_date', __('Planned arrival'), $order_by),
|
||||
'departure_date' => Users_table_header_link('planned_departure_date', __('Planned departure'), $order_by),
|
||||
'last_login_at' => Users_table_header_link('last_login_at', __('Last login'), $order_by),
|
||||
'actions' => ''
|
||||
], $usersList)
|
||||
|
|
Loading…
Reference in New Issue