Added - display asset model category on hardware view page

This commit is contained in:
snipe 2018-01-16 16:26:24 -08:00
parent 3b5e4c44eb
commit 409f5cc4fd

View file

@ -180,11 +180,34 @@
</td>
</tr>
@endif
<tr>
<td>
{{ trans('general.category') }}</td>
<td>
@if ($asset->model->category)
@can('view', \App\Models\Category::class)
<a href="{{ route('categories.show', $asset->model->category->id) }}">
{{ $asset->model->category->name }}
</a>
@else
{{ $asset->model->category->name }}
@endcan
@else
Invalid category
@endif
</td>
</tr>
<tr>
<td>
{{ trans('admin/hardware/form.model') }}</td>
<td>
@can('view', \App\Models\AssetModel::class)
@can('view', \App\Models\AssetModel::class)
<a href="{{ route('models.show', $asset->model->id) }}">
{{ $asset->model->name }}
</a>
@ -193,6 +216,8 @@
@endcan
</td>
</tr>
<tr>
<td>{{ trans('admin/models/table.modelnumber') }}</td>
<td>