mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 05:04:07 -08:00
Added sortable created_at to assets and users
This commit is contained in:
parent
27427dd26b
commit
87352470c0
|
@ -1425,7 +1425,8 @@ class AssetsController extends Controller
|
|||
'location',
|
||||
'image',
|
||||
'status_label',
|
||||
'assigned_to'
|
||||
'assigned_to',
|
||||
'created_at'
|
||||
];
|
||||
|
||||
$all_custom_fields=CustomField::all(); //used as a 'cache' of custom fields throughout this page load
|
||||
|
@ -1506,6 +1507,7 @@ class AssetsController extends Controller
|
|||
'order_number' => ($asset->order_number!='') ? '<a href="'.config('app.url').'/hardware?order_number='.e($asset->order_number).'">'.e($asset->order_number).'</a>' : '',
|
||||
'last_checkout' => ($asset->last_checkout!='') ? e($asset->last_checkout) : '',
|
||||
'expected_checkin' => ($asset->expected_checkin!='') ? e($asset->expected_checkin) : '',
|
||||
'created_at' => ($asset->created_at!='') ? e($asset->created_at->format('F j, Y h:iA')) : '',
|
||||
'change' => ($inout) ? $inout : '',
|
||||
'actions' => ($actions) ? $actions : '',
|
||||
'companyName' => is_null($asset->company) ? '' : e($asset->company->name)
|
||||
|
|
|
@ -887,7 +887,7 @@ class UsersController extends Controller
|
|||
$allowed_columns =
|
||||
[
|
||||
'last_name','first_name','email','username','employee_num',
|
||||
'assets','accessories', 'consumables','licenses','groups','activated'
|
||||
'assets','accessories', 'consumables','licenses','groups','activated','created_at'
|
||||
];
|
||||
|
||||
$sort = in_array($sort, $allowed_columns) ? $sort : 'first_name';
|
||||
|
@ -946,6 +946,7 @@ class UsersController extends Controller
|
|||
'consumables' => $user->consumables->count(),
|
||||
'groups' => $group_names,
|
||||
'notes' => e($user->notes),
|
||||
'created_at' => ($user->created_at!='') ? e($user->created_at->format('F j, Y h:iA')) : '',
|
||||
'activated' => ($user->activated=='1') ? '<i class="fa fa-check"></i>' : '<i class="fa fa-times"></i>',
|
||||
'actions' => ($actions) ? $actions : '',
|
||||
'companyName' => is_null($user->company) ? '' : e($user->company->name)
|
||||
|
|
|
@ -92,6 +92,7 @@
|
|||
<th data-sortable="true" data-visible="false" data-field="{{$field->db_column_name()}}">{{$field->name}}</th>
|
||||
@endforeach
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="change">{{ trans('admin/hardware/table.change') }}</th>
|
||||
<th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -249,6 +249,10 @@
|
|||
<td>{{ trans('admin/hardware/form.notes') }}</td>
|
||||
<td>{{ $asset->notes }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>{{ trans('general.created_at') }}</td>
|
||||
<td>{{ $asset->created_at->format('F j, Y h:iA') }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div> <!-- /table-responsive -->
|
||||
|
|
|
@ -99,6 +99,7 @@
|
|||
<th data-sortable="false" data-field="groups">{{ trans('general.groups') }}</th>
|
||||
<th data-sortable="true" data-field="notes">{{ trans('general.notes') }}</th>
|
||||
<th data-sortable="true" data-field="activated">{{ trans('general.activated') }}</th>
|
||||
<th data-sortable="true" data-field="created_at" data-searchable="true" data-visible="false">{{ trans('general.created_at') }}</th>
|
||||
<th data-switchable="false" data-searchable="false" data-sortable="false" data-field="actions" >{{ trans('table.actions') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
|
@ -111,6 +111,10 @@
|
|||
<td>{{ $user->userloc->name }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ trans('general.created_at') }}</td>
|
||||
<td>{{ $user->created_at->format('F j, Y h:iA') }}</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue