Merge branch 'develop'

This commit is contained in:
snipe 2017-10-23 17:50:58 -07:00
commit 249f86bb21
6 changed files with 287 additions and 267 deletions

View file

@ -31,6 +31,7 @@ class UsersController extends Controller
'users.two_factor_enrolled',
'users.jobtitle',
'users.email',
'users.phone',
'users.username',
'users.location_id',
'users.manager_id',
@ -93,7 +94,7 @@ class UsersController extends Controller
'last_name','first_name','email','jobtitle','username','employee_num',
'assets','accessories', 'consumables','licenses','groups','activated','created_at',
'two_factor_enrolled','two_factor_optin','last_login', 'assets_count', 'licenses_count',
'consumables_count', 'accessories_count'
'consumables_count', 'accessories_count', 'phone'
];
$sort = in_array($request->get('sort'), $allowed_columns) ? $request->get('sort') : 'first_name';

View file

@ -33,6 +33,7 @@ class UsersTransformer
'name'=> e($user->manager->username)
] : null,
'jobtitle' => ($user->jobtitle) ? e($user->jobtitle) : null,
'phone' => ($user->phone) ? e($user->phone) : null,
'email' => e($user->email),
'department' => ($user->department) ? [
'id' => (int) $user->department->id,

View file

@ -403,6 +403,7 @@ class User extends SnipeModel implements AuthenticatableContract, CanResetPasswo
->orWhere('users.email', 'LIKE', "%$search%")
->orWhere('users.username', 'LIKE', "%$search%")
->orWhere('users.notes', 'LIKE', "%$search%")
->orWhere('users.phone', 'LIKE', "%$search%")
->orWhere('users.jobtitle', 'LIKE', "%$search%")
->orWhere('users.employee_num', 'LIKE', "%$search%")
->orWhere(function ($query) use ($search) {

View file

@ -69,6 +69,14 @@ class UserPresenter extends Presenter
"visible" => true,
"formatter" => "emailFormatter"
],
[
"field" => "phone",
"searchable" => true,
"sortable" => true,
"switchable" => true,
"title" => trans('admin/users/table.phone'),
"visible" => true,
],
[
"field" => "username",
"searchable" => true,

View file

@ -19,7 +19,7 @@
"javiereguiluz/easyslugger": "^1.0",
"jenssegers/rollbar": "^1.5",
"laravel/framework": "5.4.*",
"laravel/passport": "^1.0",
"laravel/passport": "^3.0",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^5.3",
"league/csv": "^8.1",

539
composer.lock generated

File diff suppressed because it is too large Load diff