Check permission before show links or not in requestable asset models view

This commit is contained in:
Ivan Nieto Vivanco 2022-05-24 14:40:32 -05:00
parent 6d1de73cad
commit aa841a4674

View file

@ -109,7 +109,14 @@
</td>
<td><a href='{{ url("/models/{$requestableModel->id}") }}' > {{ $requestableModel->name }} </a></td>
<td>
@if (Gate::allows('superadmin'))
<a href='{{ url("/models/{$requestableModel->id}") }}' > {{ $requestableModel->name }} </a></td>
@else
{{ $requestableModel->name }}
@endif
</td>
<td>{{$requestableModel->assets->where('requestable', '1')->count()}}</td>
<td>