Only show department if it’s valid

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2021-05-05 10:13:19 -07:00
parent ab694347b0
commit d8d3fa2293

View file

@ -248,10 +248,14 @@
</tr>
@endif
@if (!is_null($user->department))
@if ($user->department)
<tr>
<td class="text-nowrap">{{ trans('general.department') }}</td>
<td><a href="{{ route('departments.show', $user->department) }}">{{ $user->department->name }}</a></td>
<td>
<a href="{{ route('departments.show', $user->department) }}">
{{ $user->department->name }}
</a>
</td>
</tr>
@endif
@if ($user->created_at)