mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-23 12:44:12 -08:00
Added user avatars to listing
This commit is contained in:
parent
8d68bb7a57
commit
dc805dd9b1
|
@ -43,7 +43,9 @@ class UsersController extends Controller
|
|||
'users.last_login',
|
||||
'users.deleted_at',
|
||||
'users.department_id',
|
||||
'users.activated'
|
||||
'users.activated',
|
||||
'users.avatar',
|
||||
|
||||
])->with('manager', 'groups', 'userloc', 'company', 'department','throttle','assets','licenses','accessories','consumables')
|
||||
->withCount('assets','licenses','accessories','consumables');
|
||||
$users = Company::scopeCompanyables($users);
|
||||
|
|
|
@ -23,6 +23,7 @@ class UsersTransformer
|
|||
{
|
||||
$array = [
|
||||
'id' => (int) $user->id,
|
||||
'avatar' => e($user->present()->gravatar),
|
||||
'name' => e($user->first_name).' '.($user->last_name),
|
||||
'firstname' => e($user->first_name),
|
||||
'lastname' => e($user->last_name),
|
||||
|
|
|
@ -34,6 +34,15 @@ class UserPresenter extends Presenter
|
|||
"title" => trans('general.id'),
|
||||
"visible" => false
|
||||
],
|
||||
[
|
||||
"field" => "avatar",
|
||||
"searchable" => false,
|
||||
"sortable" => false,
|
||||
"switchable" => true,
|
||||
"title" => 'Avatar',
|
||||
"visible" => false,
|
||||
"formatter" => "imageFormatter"
|
||||
],
|
||||
[
|
||||
"field" => "company",
|
||||
"searchable" => true,
|
||||
|
|
Loading…
Reference in a new issue