Prevent errors if company support conflict prevents viewing the item

This commit is contained in:
snipe 2016-12-01 05:54:14 -08:00
parent 8a81b29901
commit 2ab0594530

View file

@ -264,14 +264,14 @@ View Assets for {{ $user->fullName() }}
{{ strtolower(trans('general.'.str_replace(' ','_',$log->action_type))) }} {{ strtolower(trans('general.'.str_replace(' ','_',$log->action_type))) }}
</td> </td>
<td> <td>
@if ($log->itemType()=="asset") @if (($log->item) && ($log->itemType()=="asset"))
@if ($log->item->deleted_at=='') @if ($log->item->deleted_at=='')
{{ $log->item->showAssetName() }} {{ $log->item->showAssetName() }}
@else @else
<del>{{ $log->item->showAssetName() }}</del> (deleted) <del>{{ $log->item->showAssetName() }}</del> (deleted)
@endif @endif
@elseif (!is_null($log->itemType())) @elseif ($log->item)
@if ($log->item->deleted_at=='') @if ($log->item->deleted_at=='')
{{ $log->item->name }} {{ $log->item->name }}
@else @else