{{ __(session('status')) }}
@endif
@if ($errors->any())
{{ __('Please check the following:') }}
- @foreach ($errors->all() as $error)
- {{ $error }} @endforeach
@vite(['resources/css/app.css', 'resources/js/app.js'])
@php $currentUser = auth()->user(); $isStaff = $currentUser->isAdmin() || $currentUser->isEmployee(); $unreadNotifications = $currentUser->unreadNotifications()->count(); $navigation = $isStaff ? [ ['label' => 'Overview', 'route' => 'admin.dashboard', 'icon' => 'dashboard'], ['label' => 'Members', 'route' => 'admin.members.index', 'icon' => 'users'], ['label' => 'Departments', 'route' => 'admin.departments.index', 'icon' => 'users'], ['label' => 'Network', 'route' => 'admin.network.index', 'icon' => 'tree'], ['label' => 'Sales', 'route' => 'admin.sales.index', 'icon' => 'receipt'], ['label' => 'Leaderboard', 'route' => 'leaderboard', 'icon' => 'chart'], ['label' => 'Rank guide', 'route' => 'ranks', 'icon' => 'sparkles'], ['label' => 'Leads', 'route' => 'leads.index', 'icon' => 'user'], ['label' => 'Targets', 'route' => 'targets.index', 'icon' => 'chart'], ['label' => 'Incentives', 'route' => $currentUser->isAdmin() ? 'admin.incentives.index' : 'incentives.index', 'icon' => 'sparkles'], ['label' => 'Finance', 'route' => 'admin.finance.index', 'icon' => 'wallet'], ['label' => 'Salary', 'route' => 'salary.index', 'icon' => 'transfer'], ['label' => 'Ranks', 'route' => 'admin.ranks.index', 'icon' => 'sparkles'], ['label' => 'Bonuses', 'route' => 'admin.bonuses.index', 'icon' => 'chart'], ['label' => 'Wallet', 'route' => 'wallet', 'icon' => 'wallet'], ['label' => 'Transfers', 'route' => 'transfers.index', 'icon' => 'transfer'], ['label' => 'Payments', 'route' => 'admin.payments.index', 'icon' => 'receipt'], ['label' => 'Withdrawals', 'route' => 'admin.withdrawals.index', 'icon' => 'transfer'], ['label' => 'Support', 'route' => 'support.index', 'icon' => 'user'], ['label' => 'Learning room', 'route' => $currentUser->isAdmin() ? 'admin.learning.index' : 'learning.index', 'icon' => 'sparkles'], ['label' => 'System settings', 'route' => 'admin.settings.index', 'icon' => 'sparkles'], ['label' => 'Activity log', 'route' => 'admin.activity.index', 'icon' => 'receipt'], ] : [ ['label' => 'Overview', 'route' => 'dashboard', 'icon' => 'dashboard'], ['label' => 'My team', 'route' => 'team', 'icon' => 'users'], ['label' => 'Binary tree', 'route' => 'tree', 'icon' => 'tree'], ['label' => 'Leaderboard', 'route' => 'leaderboard', 'icon' => 'chart'], ['label' => 'Wallet', 'route' => 'wallet', 'icon' => 'wallet'], ['label' => 'Payments', 'route' => 'member.payments.index', 'icon' => 'receipt'], ['label' => 'Withdrawals', 'route' => 'withdrawals', 'icon' => 'transfer'], ['label' => 'Reports', 'route' => 'reports', 'icon' => 'chart'], ['label' => 'Ranks', 'route' => 'ranks', 'icon' => 'sparkles'], ]; if (! $currentUser->isAdmin()) { $navigation = array_values(array_filter($navigation, fn ($item) => ! in_array($item['route'], ['admin.departments.index', 'admin.ranks.index', 'admin.bonuses.index', 'admin.finance.index', 'admin.settings.index', 'admin.activity.index'], true))); } if ($currentUser->isEmployee()) { $navigation = array_values(array_filter($navigation, fn ($item) => ! in_array($item['route'], ['admin.members.index', 'admin.network.index'], true))); array_splice($navigation, 1, 0, [['label' => 'My team', 'route' => 'team', 'icon' => 'users']]); } if ($currentUser->isAdmin()) { $navigation[] = ['label' => 'Reports', 'route' => 'admin.reports', 'icon' => 'chart']; } $featureByRoute = [ 'admin.departments.index' => 'departments', 'targets.index' => 'targets', 'leads.index' => 'leads', 'incentives.index' => 'incentives', 'admin.incentives.index' => 'incentives', 'admin.finance.index' => 'finance', 'salary.index' => 'salary', 'transfers.index' => 'transfers', 'support.index' => 'support', 'learning.index' => 'learning', 'admin.learning.index' => 'learning', ]; $navigation = array_values(array_filter($navigation, function ($item) use ($featureByRoute, $featureFlags) { $feature = $featureByRoute[$item['route']] ?? null; return ! $feature || $featureFlags->get('feature_'.$feature) !== '0'; })); $mobileNavigation = $isStaff ? array_merge([ ['label' => 'Home', 'route' => 'admin.dashboard', 'icon' => 'home'], $currentUser->isAdmin() ? ['label' => 'Search', 'route' => 'admin.members.index', 'icon' => 'users'] : ['label' => 'My team', 'route' => 'team', 'icon' => 'users'], ['label' => 'Sales', 'route' => 'admin.sales.index', 'icon' => 'receipt'], ['label' => 'Board', 'route' => 'leaderboard', 'icon' => 'chart'], ], $featureFlags->get('feature_notifications') !== '0' ? [['label' => 'Alerts', 'route' => 'notifications.index', 'icon' => 'sparkles']] : [], [ ['label' => 'Account', 'route' => 'profile.show', 'icon' => 'user'], ]) : [ ['label' => 'Team', 'route' => 'team', 'icon' => 'users'], ['label' => 'Wallet', 'route' => 'wallet', 'icon' => 'wallet'], ['label' => 'Home', 'route' => 'dashboard', 'icon' => 'home'], ['label' => 'Board', 'route' => 'leaderboard', 'icon' => 'chart'], ['label' => 'Profile', 'route' => 'profile.show', 'icon' => 'user'], ]; @endphp
{{ $isStaff ? __('LML Operations') : __('Member space') }}
{{ $currentUser->name }}
{{ $isStaff ? ($currentUser->isEmployee() ? __('Employee') : __('Administrator')) : __('Team Leader') }}
{{ __('Please check the following:') }}