fixed list page table mobile-action permission issue..
This commit is contained in:
parent
e1f3d1fc53
commit
c430c39f1c
@ -19,14 +19,18 @@
|
|||||||
<div class="w-full my-10 m-auto flex flex-col px-2 sm:px-0 max-w-md">
|
<div class="w-full my-10 m-auto flex flex-col px-2 sm:px-0 max-w-md">
|
||||||
<div class="p-2 bg-body rounded-lg">
|
<div class="p-2 bg-body rounded-lg">
|
||||||
@foreach ($actions as $action)
|
@foreach ($actions as $action)
|
||||||
@if (! empty($action['permission']))
|
|
||||||
@can($action['permission'])
|
|
||||||
@endif
|
|
||||||
|
|
||||||
@if ($count_buttons > 3 && $loop->count > 4)
|
@if ($count_buttons > 3 && $loop->count > 4)
|
||||||
@break
|
@break
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
@if (isset($action['type']) && $action['type'] == 'divider')
|
||||||
|
@continue
|
||||||
|
@endif
|
||||||
|
|
||||||
|
@if (
|
||||||
|
empty($action['permission'])
|
||||||
|
|| (! empty($action['permission']) && user()->can($action['permission']))
|
||||||
|
)
|
||||||
@php
|
@php
|
||||||
$type = ! empty($action['type']) ? $action['type'] : 'link';
|
$type = ! empty($action['type']) ? $action['type'] : 'link';
|
||||||
@endphp
|
@endphp
|
||||||
@ -71,18 +75,14 @@
|
|||||||
|
|
||||||
$count_buttons++;
|
$count_buttons++;
|
||||||
@endphp
|
@endphp
|
||||||
|
|
||||||
@if (! empty($action['permission']))
|
|
||||||
@endcan
|
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@foreach ($actions as $action)
|
@foreach ($actions as $action)
|
||||||
@if (! empty($action['permission']))
|
@if (
|
||||||
@can($action['permission'])
|
empty($action['permission'])
|
||||||
@php $more_actions[] = $action; @endphp
|
|| (! empty($action['permission']) && user()->can($action['permission']))
|
||||||
@endcan
|
)
|
||||||
@else
|
|
||||||
@php $more_actions[] = $action; @endphp
|
@php $more_actions[] = $action; @endphp
|
||||||
@endif
|
@endif
|
||||||
@endforeach
|
@endforeach
|
||||||
|
Loading…
x
Reference in New Issue
Block a user