mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-10 07:34:06 -08:00
Include depts in returned list, sort by dept
This commit is contained in:
parent
cefb20d46f
commit
811ddd2f67
|
@ -38,8 +38,9 @@ class UsersController extends Controller
|
|||
'users.company_id',
|
||||
'users.last_login',
|
||||
'users.deleted_at',
|
||||
'users.department_id',
|
||||
'users.activated'
|
||||
])->with('manager', 'groups', 'userloc', 'company', 'throttle','assets','licenses','accessories','consumables')
|
||||
])->with('manager', 'groups', 'userloc', 'company', 'department','throttle','assets','licenses','accessories','consumables')
|
||||
->withCount('assets','licenses','accessories','consumables');
|
||||
$users = Company::scopeCompanyables($users);
|
||||
|
||||
|
@ -67,6 +68,9 @@ class UsersController extends Controller
|
|||
case 'location':
|
||||
$users = $users->OrderLocation($order);
|
||||
break;
|
||||
case 'department':
|
||||
$users = $users->OrderDepartment($order);
|
||||
break;
|
||||
default:
|
||||
$allowed_columns =
|
||||
[
|
||||
|
|
Loading…
Reference in a new issue