diff --git a/app/Http/Controllers/Api/UsersController.php b/app/Http/Controllers/Api/UsersController.php index dc444ec9e9..7b22f3af4b 100644 --- a/app/Http/Controllers/Api/UsersController.php +++ b/app/Http/Controllers/Api/UsersController.php @@ -78,12 +78,6 @@ class UsersController extends Controller $users = Company::scopeCompanyables($users); - if (($request->filled('deleted')) && ($request->input('deleted') == 'true')) { - $users = $users->onlyTrashed(); - } elseif (($request->filled('all')) && ($request->input('all') == 'true')) { - $users = $users->withTrashed(); - } - if ($request->filled('activated')) { $users = $users->where('users.activated', '=', $request->input('activated')); } @@ -272,6 +266,12 @@ class UsersController extends Controller break; } + if (($request->filled('deleted')) && ($request->input('deleted') == 'true')) { + $users = $users->onlyTrashed(); + } elseif (($request->filled('all')) && ($request->input('all') == 'true')) { + $users = $users->withTrashed(); + } + $total = $users->count(); $users = $users->skip($offset)->take($limit)->get(); diff --git a/resources/lang/en/admin/hardware/general.php b/resources/lang/en/admin/hardware/general.php index 7201d37053..d413739e35 100644 --- a/resources/lang/en/admin/hardware/general.php +++ b/resources/lang/en/admin/hardware/general.php @@ -45,4 +45,5 @@ return [ 'alert_details' => 'Please see below for details.', 'custom_export' => 'Custom Export', 'mfg_warranty_lookup' => ':manufacturer Warranty Status Lookup', + 'user_department' => 'User Department', ]; diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index f99b3f44a5..d50ca11a14 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -919,6 +919,10 @@ @endif + @if((isset($asset->assignedTo)) && ($asset->assignedTo->department)) +