From 96995e8ec758370acd14a58c744df3596cc19488 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=BCneyt=20=C5=9Eent=C3=BCrk?= Date: Mon, 7 Jun 2021 15:45:08 +0300 Subject: [PATCH] close #2088 Fixed: Broken portal menu styling. --- app/Listeners/Menu/AddPortalItems.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/Listeners/Menu/AddPortalItems.php b/app/Listeners/Menu/AddPortalItems.php index 9a931d086..03c9eb819 100644 --- a/app/Listeners/Menu/AddPortalItems.php +++ b/app/Listeners/Menu/AddPortalItems.php @@ -17,7 +17,13 @@ class AddPortalItems $user = user(); $menu = $event->menu; - $menu->route('portal.dashboard', trans_choice('general.dashboards', 1), [], 10, ['icon' => 'fa fa-tachometer-alt']); + $inactive = false; + + if (request()->route()->getName() != 'portal.dashboard') { + $inactive = true; + } + + $menu->route('portal.dashboard', trans_choice('general.dashboards', 1), [], 10, ['icon' => 'fa fa-tachometer-alt', 'inactive' => $inactive]); if ($user->can('read-portal-invoices')) { $menu->route('portal.invoices.index', trans_choice('general.invoices', 2), [], 20, ['icon' => 'fa fa-file-signature']);