mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
highlight sidebar menu when viewing entity in client portal
This commit is contained in:
parent
55fec84e1d
commit
a746384976
@ -24,6 +24,9 @@ use Illuminate\View\View;
|
||||
function isActive($page, bool $boolean = false)
|
||||
{
|
||||
$current_page = Route::currentRouteName();
|
||||
$action = Route::currentRouteAction(); // string
|
||||
|
||||
$show = str_replace(['.show','payment_methodss','documentss','subscriptionss'],['s.index','payment_methods','documents','subscriptions'], $current_page);
|
||||
|
||||
if ($page == $current_page && $boolean) {
|
||||
return true;
|
||||
@ -33,6 +36,12 @@ function isActive($page, bool $boolean = false)
|
||||
return 'bg-gray-200';
|
||||
}
|
||||
|
||||
if(($page == $show) && $boolean){
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user