mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-28 23:19:42 -08:00
Merge remote-tracking branch 'origin/develop'
This commit is contained in:
commit
1338eaa4fa
|
@ -66,7 +66,7 @@ class AssetMaintenancesTransformer
|
|||
'completion_date' => Helper::getFormattedDateObject($assetmaintenance->completion_date, 'date'),
|
||||
'user_id' => ($assetmaintenance->adminuser) ? [
|
||||
'id' => $assetmaintenance->adminuser->id,
|
||||
'name'=> e($assetmaintenance->admin->getFullNameAttribute())
|
||||
'name'=> e($assetmaintenance->adminuser->present()->fullName())
|
||||
] : null, // legacy to not change the shape of the API
|
||||
'created_by' => ($assetmaintenance->adminuser) ? [
|
||||
'id' => (int) $assetmaintenance->adminuser->id,
|
||||
|
|
|
@ -176,7 +176,7 @@ class AssetMaintenance extends Model implements ICompanyableChild
|
|||
*/
|
||||
public function adminuser()
|
||||
{
|
||||
return $this->belongsTo(\App\Models\User::class, 'user_id')
|
||||
return $this->belongsTo(\App\Models\User::class, 'created_by')
|
||||
->withTrashed();
|
||||
}
|
||||
|
||||
|
|
|
@ -116,12 +116,6 @@ class AssetMaintenancesPresenter extends Presenter
|
|||
'sortable' => true,
|
||||
'title' => trans('admin/asset_maintenances/form.cost'),
|
||||
'class' => 'text-right',
|
||||
], [
|
||||
'field' => 'user_id',
|
||||
'searchable' => true,
|
||||
'sortable' => true,
|
||||
'title' => trans('general.admin'),
|
||||
'formatter' => 'usersLinkObjFormatter',
|
||||
], [
|
||||
'field' => 'created_by',
|
||||
'searchable' => false,
|
||||
|
|
Loading…
Reference in a new issue