fix(sidebar): tambahkan opsi restore pada menu item aktif
- Memperbarui logika untuk menandai menu item sebagai aktif - Menambahkan opsi 'restore' pada kondisi pemeriksaan menu item
This commit is contained in:
parent
23191cd4e3
commit
40112e1d1b
@ -108,7 +108,7 @@
|
||||
<div class="menu-accordion gap-0.5 pl-[10px] relative before:absolute before:left-[20px] before:top-0 before:bottom-0 before:border-l before:border-gray-200">
|
||||
@foreach($menu->sub as $sub)
|
||||
@if(auth()->user()->hasRole($sub->roles))
|
||||
<div class="menu-item {{ request()->routeIs($sub->path.'.*') && in_array(request()->route()->getName(), [$sub->path.'.index', $sub->path.'.create', $sub->path.'.edit']) ? 'active' : '' }}">
|
||||
<div class="menu-item {{ request()->routeIs($sub->path.'.*') && in_array(request()->route()->getName(), [$sub->path.'.index', $sub->path.'.create', $sub->path.'.edit', $sub->path.'.restore']) ? 'active' : '' }}">
|
||||
<a class="menu-link gap-[14px] pl-[10px] pr-[10px] py-[8px] border border-transparent items-center grow menu-item-active:bg-secondary-active dark:menu-item-active:bg-coal-300 dark:menu-item-active:border-gray-100 menu-item-active:rounded-lg hover:bg-secondary-active dark:hover:bg-coal-300 dark:hover:border-gray-100 hover:rounded-lg"
|
||||
href="{{ $sub->path ? route($sub->path.'.index') : '' }}" tabindex="0">
|
||||
<span
|
||||
|
Loading…
x
Reference in New Issue
Block a user