Hide requested assets if the user cannot see requestable items

Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
snipe 2022-08-02 11:48:45 -07:00
parent 031b7998c9
commit 8027039754

View file

@ -316,11 +316,14 @@
{{ trans('general.viewassets') }} {{ trans('general.viewassets') }}
</a></li> </a></li>
@can('viewRequestable', \App\Models\Asset::class)
<li {!! (Request::is('account/requested') ? ' class="active"' : '') !!}> <li {!! (Request::is('account/requested') ? ' class="active"' : '') !!}>
<a href="{{ route('account.requested') }}"> <a href="{{ route('account.requested') }}">
<i class="fas fa-check fa-disk fa-fw" aria-hidden="true"></i> <i class="fas fa-check fa-disk fa-fw" aria-hidden="true"></i>
{{ trans('general.requested_assets_menu') }} {{ trans('general.requested_assets_menu') }}
</a></li> </a></li>
@endcan
<li {!! (Request::is('account/accept') ? ' class="active"' : '') !!}> <li {!! (Request::is('account/accept') ? ' class="active"' : '') !!}>
<a href="{{ route('account.accept') }}"> <a href="{{ route('account.accept') }}">
<i class="fas fa-check fa-disk fa-fw"></i> <i class="fas fa-check fa-disk fa-fw"></i>