mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Fixes #3790 - parent display on locations index
This commit is contained in:
parent
63bc2ec09f
commit
1d7e243d0a
|
@ -44,7 +44,10 @@ class LocationsTransformer
|
|||
'assets' => $assets_arr,
|
||||
'created_at' => Helper::getFormattedDateObject($location->created_at, 'datetime'),
|
||||
'updated_at' => Helper::getFormattedDateObject($location->updated_at, 'datetime'),
|
||||
'parent_id' => ($location->parent_id) ? (int) $location->parent_id : null,
|
||||
'parent' => ($location->parent) ? [
|
||||
'id' => (int) $location->parent->id,
|
||||
'name'=> e($location->parent->name)
|
||||
] : null,
|
||||
'children' => $children_arr,
|
||||
];
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<tr>
|
||||
<th data-sortable="true" data-field="id" data-visible="false">{{ trans('general.id') }}</th>
|
||||
<th data-sortable="true" data-formatter="locationsLinkFormatter" data-field="name" data-searchable="true">{{ trans('admin/locations/table.name') }}</th>
|
||||
<th data-sortable="true" data-field="parent">{{ trans('admin/locations/table.parent') }}</th>
|
||||
<th data-sortable="true" data-field="parent" data-formatter="locationsLinkObjFormatter">{{ trans('admin/locations/table.parent') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="assets_default">{{ trans('admin/locations/table.assets_rtd') }}</th>
|
||||
<th data-searchable="false" data-sortable="false" data-field="assets_checkedout">{{ trans('admin/locations/table.assets_checkedout') }}</th>
|
||||
<th data-searchable="true" data-sortable="true" data-field="currency">{{ App\Models\Setting::first()->default_currency }}</th>
|
||||
|
|
Loading…
Reference in a new issue