mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 13:57:41 -08:00
Added users, locations to presenter, transformer
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
410b547f3c
commit
482965197d
|
@ -64,6 +64,8 @@ class UsersTransformer
|
|||
'licenses_count' => (int) $user->licenses_count,
|
||||
'accessories_count' => (int) $user->accessories_count,
|
||||
'consumables_count' => (int) $user->consumables_count,
|
||||
'manages_users_count' => (int) $user->manages_users_count,
|
||||
'manages_locations_count' => (int) $user->manages_locations_count,
|
||||
'company' => ($user->company) ? ['id' => (int) $user->company->id, 'name'=> e($user->company->name)] : null,
|
||||
'created_by' => ($user->createdBy) ? [
|
||||
'id' => (int) $user->createdBy->id,
|
||||
|
|
|
@ -251,6 +251,24 @@ class UserPresenter extends Presenter
|
|||
'title' => 'Accessories',
|
||||
'visible' => true,
|
||||
],
|
||||
[
|
||||
'field' => 'manages_users_count',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'class' => 'css-users',
|
||||
'title' => 'Managed Users',
|
||||
'visible' => true,
|
||||
],
|
||||
[
|
||||
'field' => 'manages_locations_count',
|
||||
'searchable' => false,
|
||||
'sortable' => true,
|
||||
'switchable' => true,
|
||||
'class' => 'css-location',
|
||||
'title' => 'Managed Locations',
|
||||
'visible' => true,
|
||||
],
|
||||
[
|
||||
'field' => 'notes',
|
||||
'searchable' => true,
|
||||
|
|
Loading…
Reference in a new issue