Handle deleted assets in maintenance

This commit is contained in:
snipe 2017-10-16 21:28:05 -07:00
parent e0668b7507
commit 02db0f9f9d

View file

@ -200,7 +200,13 @@
@foreach ($supplier->asset_maintenances as $improvement)
@if (is_null($improvement->deleted_at))
<tr>
<td><a href="{{ route('hardware.show', $improvement->asset_id) }}">{{ $improvement->asset->name }}</a></td>
<td>
@if ($improvement->asset)
<a href="{{ route('hardware.show', $improvement->asset_id) }}">{{ $improvement->asset->name }}</a>
@else
(deleted asset)
@endif
</td>
<td>{{ $improvement->asset_maintenance_type }}</td>
<td>{{ $improvement->start_date }}</td>
<td>{{ $improvement->completion_date }}</td>