Check for valid seat on hardware view

This commit is contained in:
snipe 2019-07-17 12:09:18 -07:00
parent b4b6d6b571
commit 79ab0d8dc2

View file

@ -569,19 +569,21 @@
</thead>
<tbody>
@foreach ($asset->licenseseats as $seat)
<tr>
<td><a href="{{ route('licenses.show', $seat->license->id) }}">{{ $seat->license->name }}</a></td>
<td>
@can('viewKeys', $seat->license)
{!! nl2br(e($seat->license->serial)) !!}
@else
------------
@endcan
</td>
<td>
<a href="{{ route('licenses.checkin', $seat->id) }}" class="btn btn-sm bg-purple" data-tooltip="true">{{ trans('general.checkin') }}</a>
</td>
</tr>
@if ($seat->license)
<tr>
<td><a href="{{ route('licenses.show', $seat->license->id) }}">{{ $seat->license->name }}</a></td>
<td>
@can('viewKeys', $seat->license)
{!! nl2br(e($seat->license->serial)) !!}
@else
------------
@endcan
</td>
<td>
<a href="{{ route('licenses.checkin', $seat->id) }}" class="btn btn-sm bg-purple" data-tooltip="true">{{ trans('general.checkin') }}</a>
</td>
</tr>
@endif
@endforeach
</tbody>
</table>