@if($settingsService->logoUrl())
![{{ $branding['organization_short_name'] }}]({{ $settingsService->logoUrl() }})
@else
@endif
{{ $branding['organization_short_name'] ?? 'CMS' }} {{ $branding['admin_panel_label'] ?? 'CONFERENCE ADMIN' }}
@php
$adminUser = auth()->user();
$canAdminScope = function (?string $scope, string $permission = 'view') use ($adminUser) {
if (! $adminUser) {
return false;
}
if ($adminUser->isSuperAdmin()) {
return true;
}
return $scope && $adminUser->hasScopePermission($scope, $permission);
};
$routeActive = function (string $routeName): bool {
return request()->routeIs($routeName) || request()->routeIs(str_replace('.index', '.*', $routeName));
};
$items = [
['type' => 'link', 'label' => 'Dashboard', 'icon' => 'fa-gauge', 'route' => 'admin.dashboard', 'scope' => 'dashboard'],
['type' => 'link', 'label' => 'Conferences', 'icon' => 'fa-calendar-days', 'route' => 'admin.conferences.index', 'scope' => 'conferences'],
['type' => 'link', 'label' => 'Participants', 'icon' => 'fa-users', 'route' => 'admin.participants.index', 'scope' => 'participants'],
['type' => 'link', 'label' => 'Conference Speakers', 'icon' => 'fa-microphone', 'route' => 'admin.conference-speakers.index', 'scope' => 'conference_speakers'],
['type' => 'link', 'label' => 'Papers', 'icon' => 'fa-file-lines', 'route' => 'admin.papers.index', 'scope' => 'papers'],
['type' => 'link', 'label' => 'Track Recommendation Queue', 'icon' => 'fa-list-check', 'route' => 'admin.paper-queue.track-recommendations', 'scope' => 'papers'],
['type' => 'link', 'label' => 'Final Decision Queue', 'icon' => 'fa-gavel', 'route' => 'admin.paper-queue.final-decisions', 'scope' => 'papers'],
['type' => 'link', 'label' => 'Paper Review', 'icon' => 'fa-star-half-stroke', 'route' => 'admin.paper-review.index', 'scope' => 'papers'],
['type' => 'link', 'label' => 'Paper Email Templates', 'icon' => 'fa-envelope-open-text', 'route' => 'admin.paper-email-templates.index', 'scope' => 'papers'],
['type' => 'link', 'label' => 'Paper Notifications', 'icon' => 'fa-paper-plane', 'route' => 'admin.paper-notifications.index', 'scope' => 'papers'],
['type' => 'link', 'label' => 'External Paper Reviews', 'icon' => 'fa-file-circle-check', 'route' => 'admin.external-paper-reviews.index', 'scope' => 'papers'],
[
'type' => 'group',
'label' => 'Finance',
'icon' => 'fa-wallet',
'toggle' => true,
'children' => [
['label' => 'Payments', 'icon' => 'fa-credit-card', 'route' => 'admin.payments.index', 'scope' => 'payments'],
['label' => 'Pending', 'icon' => 'fa-hourglass-half', 'route' => 'admin.payments.pending', 'scope' => 'payments'],
['label' => 'Fees Setup', 'icon' => 'fa-tags', 'route' => 'admin.fees.index', 'scope' => 'fees'],
['label' => 'Paystack Config', 'icon' => 'fa-key', 'route' => 'admin.paystack.index', 'scope' => 'paystack'],
['label' => 'Invoices', 'icon' => 'fa-file-invoice', 'route' => 'admin.invoices.index', 'scope' => 'payments'],
['label' => 'Reconciliation', 'icon' => 'fa-scale-balanced', 'route' => 'admin.finance-reconciliation.index', 'scope' => 'payments'],
],
],
['type' => 'link', 'label' => 'Tags & Check-in', 'icon' => 'fa-qrcode', 'route' => 'admin.checkin.index', 'scope' => 'tags_checkin'],
['type' => 'link', 'label' => 'Certificates', 'icon' => 'fa-award', 'route' => 'admin.certificates.index', 'scope' => 'certificates'],
['type' => 'link', 'label' => 'Conference Resources', 'icon' => 'fa-folder-open', 'route' => 'admin.conference-documents.index', 'scope' => 'conference_documents'],
['type' => 'link', 'label' => 'Presentation Uploads', 'icon' => 'fa-file-powerpoint', 'route' => 'admin.presentations.index', 'scope' => 'presentations'],
['type' => 'link', 'label' => 'Committees & LOC', 'icon' => 'fa-people-group', 'route' => 'admin.committees.index', 'scope' => 'committees'],
['type' => 'link', 'label' => 'AGM', 'icon' => 'fa-handshake', 'route' => 'admin.agm.index', 'scope' => 'agm'],
['type' => 'link', 'label' => 'Elections', 'icon' => 'fa-square-poll-vertical', 'route' => 'admin.elections.index', 'scope' => 'elections'],
['type' => 'link', 'label' => 'Election OTP Settings', 'icon' => 'fa-shield-halved', 'route' => 'admin.elections.otp-settings.index', 'scope' => 'elections'],
['type' => 'link', 'label' => 'Notifications', 'icon' => 'fa-bell', 'route' => 'admin.notifications.index', 'scope' => 'notifications'],
['type' => 'link', 'label' => 'Bulk Uploads', 'icon' => 'fa-upload', 'route' => 'admin.bulk-uploads.index', 'scope' => 'bulk_uploads'],
['type' => 'link', 'label' => 'Reports', 'icon' => 'fa-chart-column', 'route' => 'admin.reports.index', 'scope' => 'reports'],
['type' => 'link', 'label' => 'Users & Roles', 'icon' => 'fa-user-shield', 'route' => 'admin.users-roles.index', 'scope' => 'users_roles'],
['type' => 'link', 'label' => 'Settings', 'icon' => 'fa-gear', 'route' => 'admin.settings.index', 'scope' => 'settings'],
['type' => 'link', 'label' => 'Activity Logs', 'icon' => 'fa-clock-rotate-left', 'route' => 'admin.activity-logs.index', 'scope' => 'activity_logs'],
];
@endphp
@foreach($items as $item)
@if(($item['type'] ?? 'link') === 'group')
@php
$visibleChildren = collect($item['children'] ?? [])->filter(
fn ($child) => $canAdminScope($child['scope'] ?? null)
);
$showGroup = $canAdminScope($item['scope'] ?? null) || $visibleChildren->isNotEmpty();
$groupActive = $visibleChildren->contains(fn ($child) => $routeActive($child['route']))
|| (! empty($item['route']) && $routeActive($item['route']));
$isToggleGroup = ! empty($item['toggle']);
@endphp
@if($showGroup)