| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- @if(auth()->check())
- @php
- $dkrActive = in_array($active ?? '', [
- 'orders',
- 'product_sku',
- 'catalog',
- 'reports',
- 'responsibles',
- 'maf_order',
- ], true);
- $schedulesActive = in_array($active ?? '', [
- 'schedule_orders',
- 'schedule_deliveries',
- 'schedule',
- ], true);
- $reclamationsActive = ($active ?? '') === 'reclamations';
- $sparePartsActive = in_array($active ?? '', [
- 'spare_parts',
- 'spare_part_orders',
- 'spare_part_inventory',
- 'pricing_codes',
- 'spare_parts_help',
- ], true);
- $stockActive = in_array($active ?? '', ['stock', 'stock_orders'], true);
- $adminActive = in_array($active ?? '', [
- 'contractors',
- 'contracts',
- 'users',
- 'roles',
- 'admin_settings',
- 'admin_districts',
- 'admin_areas',
- 'notification_logs',
- 'import',
- 'year-data',
- 'clear-data',
- ], true);
- @endphp
- @if(hasAnyPermission([
- 'orders.view',
- 'maf.view',
- 'catalog.view',
- 'reports.view',
- 'responsibles.view',
- 'maf_orders.view',
- ]))
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle @if($dkrActive) active @endif" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
- ДКР
- </a>
- <ul class="dropdown-menu">
- @if(hasPermission('orders.view'))<li><a class="dropdown-item @if(($active ?? '') === 'orders') active @endif" href="{{ route('order.index', session('gp_orders')) }}">Площадки</a></li>@endif
- @if(hasPermission('maf.view'))<li><a class="dropdown-item @if(($active ?? '') === 'product_sku') active @endif" href="{{ route('product_sku.index', session('gp_product_sku')) }}">МАФ</a></li>@endif
- @if(hasPermission('catalog.view'))<li><a class="dropdown-item @if(($active ?? '') === 'catalog') active @endif" href="{{ route('catalog.index', session('gp_products')) }}">Каталог</a></li>@endif
- @if(hasPermission('reports.view'))<li><a class="dropdown-item @if(($active ?? '') === 'reports') active @endif" href="{{ route('reports.index', session('gp_reports')) }}">Отчёты</a></li>@endif
- @if(hasPermission('responsibles.view'))<li><a class="dropdown-item @if(($active ?? '') === 'responsibles') active @endif" href="{{ route('responsible.index', session('gp_responsibles')) }}">Ответственные</a></li>@endif
- @if(hasPermission('maf_orders.view'))<li><a class="dropdown-item @if(($active ?? '') === 'maf_order') active @endif" href="{{ route('maf_order.index', session('gp_maf_order')) }}">Заказы МАФ</a></li>@endif
- </ul>
- </li>
- @endif
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle @if($schedulesActive) active @endif" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
- Графики
- </a>
- <ul class="dropdown-menu">
- <li><a class="dropdown-item @if(($active ?? '') === 'schedule_orders') active @endif" href="{{ route('schedule.orders') }}">График заказов</a></li>
- <li><a class="dropdown-item @if(($active ?? '') === 'schedule_deliveries') active @endif" href="{{ route('schedule.deliveries') }}">График доставок</a></li>
- @if(hasPermission('schedule.view'))<li><a class="dropdown-item @if(($active ?? '') === 'schedule') active @endif" href="{{ route('schedule.index', session('gp_schedule')) }}">График монтажей</a></li>@endif
- </ul>
- </li>
- @if(hasPermission('reclamations.view'))
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle @if($reclamationsActive) active @endif" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
- Рекламации
- </a>
- <ul class="dropdown-menu">
- <li><a class="dropdown-item @if(($active ?? '') === 'reclamations' && request('tab') !== 'dkr') active @endif" href="{{ route('reclamations.index', session('gp_reclamations')) }}">Все</a></li>
- <li><a class="dropdown-item @if(($active ?? '') === 'reclamations' && request('tab') === 'dkr') active @endif" href="{{ route('reclamations.index', array_merge((array) session('gp_reclamations', []), ['tab' => 'dkr'])) }}">ДКР</a></li>
- </ul>
- </li>
- @endif
- @if(hasPermission('spare_parts.view'))
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle @if($sparePartsActive) active @endif" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
- Запчасти
- </a>
- <ul class="dropdown-menu">
- <li><a class="dropdown-item @if(($active ?? '') === 'spare_parts') active @endif" href="{{ route('spare_parts.index', session('gp_spare_parts', [])) }}">Каталог</a></li>
- @if(hasPermission('spare_part_orders.view'))<li><a class="dropdown-item @if(($active ?? '') === 'spare_part_orders') active @endif" href="{{ route('spare_part_orders.index') }}">Заказы запчастей</a></li>@endif
- @if(hasPermission('spare_part_inventory.view'))<li><a class="dropdown-item @if(($active ?? '') === 'spare_part_inventory') active @endif" href="{{ route('spare_part_inventory.index') }}">Контроль наличия</a></li>@endif
- <li><a class="dropdown-item @if(($active ?? '') === 'pricing_codes') active @endif" href="{{ route('pricing_codes.index') }}">Справочник расшифровок</a></li>
- <li><a class="dropdown-item @if(($active ?? '') === 'spare_parts_help') active @endif" href="{{ route('spare_parts.help') }}">Справка</a></li>
- </ul>
- </li>
- @endif
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle @if($stockActive) active @endif" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
- Склад наличие
- </a>
- <ul class="dropdown-menu">
- <li><a class="dropdown-item @if(($active ?? '') === 'stock') active @endif" href="{{ route('stock.index') }}">Наличие</a></li>
- <li><a class="dropdown-item @if(($active ?? '') === 'stock_orders') active @endif" href="{{ route('stock.orders') }}">Заказы</a></li>
- </ul>
- </li>
- <li class="nav-item">
- <a class="nav-link @if(($active ?? '') === 'common_catalog') active @endif" href="{{ route('common-catalog.index') }}">Каталог общий</a>
- </li>
- <li class="nav-item">
- <a class="nav-link @if(($active ?? '') === 'documents') active @endif" href="{{ route('documents.index') }}">Документация</a>
- </li>
- <li class="nav-item">
- <a class="nav-link @if(($active ?? '') === 'calculations') active @endif" href="{{ route('calculations.index') }}">Калькуляции</a>
- </li>
- @if(hasAnyPermission([
- 'contractors.view',
- 'contracts.view',
- 'users.view',
- 'admin.roles',
- 'admin.settings.view',
- 'districts.view',
- 'areas.view',
- 'admin.notification_logs.view',
- 'import.view',
- 'admin.year_data.view',
- 'admin.clear_data.view',
- ]))
- <li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle @if($adminActive) active @endif" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
- Администратор
- </a>
- <ul class="dropdown-menu dropdown-menu-end">
- @if(hasPermission('contractors.view'))<li><a class="dropdown-item @if(($active ?? '') === 'contractors') active @endif" href="{{ route('contractors.index', session('gp_contractors')) }}">Подрядчики</a></li>@endif
- @if(hasPermission('contracts.view'))<li><a class="dropdown-item @if(($active ?? '') === 'contracts') active @endif" href="{{ route('contract.index', session('gp_contracts')) }}">Договоры</a></li>@endif
- @if(hasPermission('users.view'))<li><a class="dropdown-item @if(($active ?? '') === 'users') active @endif" href="{{ route('user.index', session('gp_users')) }}">Пользователи</a></li>@endif
- @if(hasPermission('admin.roles'))<li><a class="dropdown-item @if(($active ?? '') === 'roles') active @endif" href="{{ route('admin.roles.index') }}">Роли и права</a></li>@endif
- @if(hasPermission('admin.settings.view'))<li><a class="dropdown-item @if(($active ?? '') === 'admin_settings') active @endif" href="{{ route('admin.settings.index') }}">Настройки</a></li>@endif
- @if(hasPermission('districts.view'))<li><a class="dropdown-item @if(($active ?? '') === 'admin_districts') active @endif" href="{{ route('admin.district.index') }}">Округа</a></li>@endif
- @if(hasPermission('areas.view'))<li><a class="dropdown-item @if(($active ?? '') === 'admin_areas') active @endif" href="{{ route('admin.area.index') }}">Районы</a></li>@endif
- @if(hasPermission('admin.notification_logs.view'))<li><a class="dropdown-item @if(($active ?? '') === 'notification_logs') active @endif" href="{{ route('admin.notifications.log') }}">Журнал уведомлений</a></li>@endif
- @if(hasPermission('import.view'))<li><a class="dropdown-item @if(($active ?? '') === 'import') active @endif" href="{{ route('import.index', session('gp_import')) }}">Импорт</a></li>@endif
- @if(hasPermission('admin.year_data.view'))<li><a class="dropdown-item @if(($active ?? '') === 'year-data') active @endif" href="{{ route('year-data.index') }}">Экспорт/Импорт года</a></li>@endif
- @if(hasPermission('admin.clear_data.view'))<li><a class="dropdown-item @if(($active ?? '') === 'clear-data') active @endif" href="{{ route('clear-data.index') }}">Удалить данные</a></li>@endif
- </ul>
- </li>
- @endif
- @endif
|