mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 22:07:29 -08:00
Fixes #3491 - adds supplier info to assets listing
This commit is contained in:
parent
a7132fcdd7
commit
54a2c46101
|
@ -43,6 +43,10 @@ class AssetsTransformer
|
|||
'id' => (int) $asset->model->manufacturer->id,
|
||||
'name'=> e($asset->model->manufacturer->name)
|
||||
] : null,
|
||||
'supplier' => ($asset->supplier) ? [
|
||||
'id' => (int) $asset->supplier->id,
|
||||
'name'=> e($asset->supplier->name)
|
||||
] : null,
|
||||
'notes' => e($asset->notes),
|
||||
'order_number' => e($asset->order_number),
|
||||
'company' => ($asset->company) ? [
|
||||
|
|
|
@ -113,6 +113,13 @@ class AssetPresenter extends Presenter
|
|||
"title" => trans('general.manufacturer'),
|
||||
"visible" => false,
|
||||
"formatter" => "manufacturersLinkObjFormatter"
|
||||
],[
|
||||
"field" => "supplier",
|
||||
"searchable" => true,
|
||||
"sortable" => true,
|
||||
"title" => trans('general.supplier'),
|
||||
"visible" => false,
|
||||
"formatter" => "suppliersLinkObjFormatter"
|
||||
], [
|
||||
"field" => "purchase_date",
|
||||
"searchable" => true,
|
||||
|
|
|
@ -49,10 +49,14 @@
|
|||
@foreach ($supplier->assets as $supplierassets)
|
||||
<tr>
|
||||
<td>
|
||||
{!! $supplierassets->present()->assetTagUrl() !!}
|
||||
<a href="{{ route('suppliers.show', $supplierassets->id) }}">
|
||||
{{ $supplierassets->asset_tag }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
{!! $supplierassets->present()->nameUrl() !!}
|
||||
<a href="{{ route('suppliers.show', $supplierassets->id) }}">
|
||||
{{ $supplierassets->name }}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
@if ($supplierassets->assigneduser)
|
||||
|
|
Loading…
Reference in a new issue