From ff4d01e6a4d93ff5c8361579f179778b2031b6e4 Mon Sep 17 00:00:00 2001 From: Thekindbull Date: Thu, 24 Apr 2025 10:28:13 +0800 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D0=B0=20=D0=B3?= =?UTF-8?q?=D0=BB=D0=B0=D0=B2=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D1=8E=20=D0=B4=D0=BB=D1=8F=20=D1=84=D0=B8=D0=BA=D1=81=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8=20=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=BD=D0=BE?= =?UTF-8?q?=D0=B3=D0=BE=20=D0=BF=D1=83=D0=BD=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/css/app.css | 5 + resources/views/livewire/main-menu.blade.php | 133 ++++++++++--------- 2 files changed, 73 insertions(+), 65 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 6beb8d0..bb7b2a6 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -27,6 +27,11 @@ #leftPanel .nav-link { color: #20184d; } +#leftPanel .nav-link.active { + color: #e4e4e4; + background-color: #20184d; +} + input[type="radio"]:checked+label { background-color: #e6662a !important; color: white !important; diff --git a/resources/views/livewire/main-menu.blade.php b/resources/views/livewire/main-menu.blade.php index f852c7c..97a2078 100644 --- a/resources/views/livewire/main-menu.blade.php +++ b/resources/views/livewire/main-menu.blade.php @@ -1,73 +1,76 @@ + 'home', + 'name' => 'Главная', + 'icon' => 'columns-gap', + ]; +} +if (in_array($roles::AGENT, $userRoles) || in_array($roles::COMPANY_ADMIN, $userRoles)) { + $items[] = [ + 'route' => 'clients.table', + 'name' => 'Клиенты', + 'icon' => 'person', + ]; +} +if (in_array($roles::AGENT, $userRoles) || in_array($roles::COMPANY_ADMIN, $userRoles)) { + /*$items[] = [ + 'route' => 'projects', + 'name' => 'Проекты', + 'icon' => 'book', + ];*/ +} + +$items[] = [ + 'route' => 'posts', + 'name' => 'Новости', + 'icon' => 'layers', +]; + +if (in_array($roles::COMPANY_ADMIN, $userRoles)) { + $items[] = [ + 'route' => 'company.agents.table', + 'name' => 'Агенты', + 'icon' => 'people', + ]; +} + +$items[] = [ + 'route' => 'docs.index', + 'name' => 'Документы', + 'icon' => 'archive', +]; + +if (in_array($roles::COMPANY_ADMIN, $userRoles)) { + $items[] = [ + 'route' => 'company.details', + 'name' => 'Настройки', + 'icon' => 'gear', + ]; +} + +if (in_array($roles::SUPER_ADMIN, $userRoles)) { + $items[] = [ + 'route' => 'admin.index', + 'name' => 'Админка', + 'icon' => 'arrow-right-square', + ]; +} +?>
+ @php($current = Route::currentRouteName()) -