mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 14:27:33 -08:00
Merge pull request #13158 from Godmartinz/asset_maint_warranty_bug
Added warranty confirmation to asset maintenance table
This commit is contained in:
commit
21a27f43a9
|
@ -71,7 +71,8 @@ class AssetMaintenancesController extends Controller
|
|||
'asset_tag',
|
||||
'asset_name',
|
||||
'user_id',
|
||||
'supplier'
|
||||
'supplier',
|
||||
'is_warranty',
|
||||
];
|
||||
$order = $request->input('order') === 'asc' ? 'asc' : 'desc';
|
||||
$sort = in_array($request->input('sort'), $allowed_columns) ? e($request->input('sort')) : 'created_at';
|
||||
|
|
|
@ -59,6 +59,7 @@ class AssetMaintenancesTransformer
|
|||
'user_id' => ($assetmaintenance->admin) ? ['id' => $assetmaintenance->admin->id, 'name'=> e($assetmaintenance->admin->getFullNameAttribute())] : null,
|
||||
'created_at' => Helper::getFormattedDateObject($assetmaintenance->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($assetmaintenance->updated_at, 'datetime'),
|
||||
'is_warranty'=> $assetmaintenance->is_warranty,
|
||||
|
||||
];
|
||||
|
||||
|
|
|
@ -95,6 +95,7 @@ class AssetMaintenancesPresenter extends Presenter
|
|||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('admin/asset_maintenances/table.is_warranty'),
|
||||
'formatter' => 'trueFalseFormatter'
|
||||
], [
|
||||
'field' => 'cost',
|
||||
'searchable' => true,
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
<th data-searchable="true" data-sortable="true" data-field="cost" class="text-right" data-footer-formatter="sumFormatter">{{ trans('admin/asset_maintenances/form.cost') }}</th>
|
||||
<th data-sortable="true" data-field="location" data-formatter="deployedLocationFormatter" data-visible="false">{{ trans('general.location') }}</th>
|
||||
<th data-sortable="true" data-field="rtd_location" data-formatter="deployedLocationFormatter" data-visible="false">{{ trans('admin/hardware/form.default_location') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="is_warranty" data-formatter="trueFalseformatter">{{ trans('admin/asset_maintenances/table.is_warranty') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="user_id" data-formatter="usersLinkObjFormatter">{{ trans('general.admin') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="notes" data-visible="false">{{ trans('admin/asset_maintenances/form.notes') }}</th>
|
||||
</tr>
|
||||
|
|
Loading…
Reference in a new issue