Merge remote-tracking branch 'origin/develop'

This commit is contained in:
snipe 2022-06-23 19:12:13 -07:00
commit a75fc8af7e
5 changed files with 6 additions and 5 deletions

View file

@ -188,7 +188,7 @@ class UsersController extends Controller
$users = $users->OrderDepartment($order);
break;
case 'created_by':
$users = $users->CreatedBy($order);
$users = $users->OrderByCreatedBy($order);
break;
case 'company':
$users = $users->OrderCompany($order);

View file

@ -705,7 +705,7 @@ class User extends SnipeModel implements AuthenticatableContract, AuthorizableCo
*
* @return \Illuminate\Database\Query\Builder Modified query builder
*/
public function scopeCreatedBy($query, $order)
public function scopeOrderByCreatedBy($query, $order)
{
// Left join here, or it will only return results with parents
return $query->leftJoin('users as admin_user', 'users.created_by', '=', 'admin_user.id')

View file

@ -289,7 +289,7 @@ class UserPresenter extends Presenter
'field' => 'created_by',
'searchable' => false,
'sortable' => true,
'title' => trans('general.admin'),
'title' => trans('general.created_by'),
'visible' => false,
'formatter' => 'usersLinkObjFormatter',
],

View file

@ -65,7 +65,8 @@ return [
'create' => 'Create New',
'created' => 'Item Created',
'created_asset' => 'created asset',
'created_at' => 'Created at',
'created_at' => 'Created At',
'created_by' => 'Created By',
'record_created' => 'Record Created',
'updated_at' => 'Updated at',
'currency' => '$', // this is deprecated

View file

@ -465,7 +465,7 @@
{{ \App\Helpers\Helper::getFormattedDateObject($user->created_at, 'datetime')['formatted']}}
@if ($user->createdBy)
by
-
@if ($user->createdBy->deleted_at=='')
<a href="{{ route('users.show', ['user' => $user->created_by]) }}">{{ $user->createdBy->present()->fullName }}</a>
@else