Make user view columns dynamic by config
This commit is contained in:
parent
92e0b8be65
commit
b1b08afd23
|
@ -285,6 +285,9 @@ return [
|
||||||
// Number of shifts to freeload until angel is locked for shift signup.
|
// Number of shifts to freeload until angel is locked for shift signup.
|
||||||
'max_freeloadable_shifts' => env('MAX_FREELOADABLE_SHIFTS', 2),
|
'max_freeloadable_shifts' => env('MAX_FREELOADABLE_SHIFTS', 2),
|
||||||
|
|
||||||
|
// Hide columns in backend user view. Possible values are any sortable parameters of the table.
|
||||||
|
'disabled_user_view_columns' => [],
|
||||||
|
|
||||||
// Local timezone
|
// Local timezone
|
||||||
'timezone' => env('TIMEZONE', 'Europe/Berlin'),
|
'timezone' => env('TIMEZONE', 'Europe/Berlin'),
|
||||||
|
|
||||||
|
|
|
@ -158,6 +158,10 @@ function Users_view(
|
||||||
$user_table_headers['last_login_at'] = Users_table_header_link('last_login_at', __('Last login'), $order_by);
|
$user_table_headers['last_login_at'] = Users_table_header_link('last_login_at', __('Last login'), $order_by);
|
||||||
$user_table_headers['actions'] = '';
|
$user_table_headers['actions'] = '';
|
||||||
|
|
||||||
|
foreach (config('disabled_user_view_columns') ?? [] as $key) {
|
||||||
|
unset($user_table_headers[$key]);
|
||||||
|
}
|
||||||
|
|
||||||
return page_with_title(__('All users'), [
|
return page_with_title(__('All users'), [
|
||||||
msg(),
|
msg(),
|
||||||
buttons([
|
buttons([
|
||||||
|
|
Loading…
Reference in New Issue