{{ \App\Support\Branding::name() }}
@if (in_array($role, ['admin', 'adviser', 'manager'], true))
{{-- Global search: students (by name, phone, ИИН, or parent name/phone) /
teachers / groups, backed by GET /search.php (GlobalSearchController).
Teachers only come back for admins — see the controller for why. --}}
@endif
@if ($role === 'adviser' || $role === 'admin')
@php
$notifGroups = [];
if ($unreadCount > 0) {
$notifGroups[] = [
'key' => 'feedback',
'label' => 'Новые отзывы',
'count' => $unreadCount,
'textClass' => 'text-primary',
'badgeClass' => 'bg-primary',
];
}
if (! empty($absenceNotifications)) {
$notifGroups[] = [
'key' => 'absences',
'label' => 'Пропуски занятий',
'count' => count($absenceNotifications),
'textClass' => 'text-danger',
'badgeClass' => 'bg-danger',
];
}
if (! empty($delayNotifications)) {
$notifGroups[] = [
'key' => 'delays',
'label' => 'Опоздания',
'count' => count($delayNotifications),
'textClass' => 'text-info',
'badgeClass' => 'bg-info text-dark',
];
}
if (! empty($paymentReminders)) {
$notifGroups[] = [
'key' => 'payments',
'label' => 'Напоминания об оплате',
'count' => count($paymentReminders),
'textClass' => 'text-warning',
'badgeClass' => 'bg-warning text-dark',
];
}
@endphp
@if (count($notifGroups) > 0)
{{ count($notifGroups) }}
@endif
@if (empty($notifGroups))
Нет уведомлений
@else
@foreach ($notifGroups as $g)
{{ $g['label'] }}
{{ $g['count'] }}
@endforeach
@endif
Все уведомления
@elseif ($role === 'teacher' && $teacherUnreadCount > 0)
{{-- No dropdown for teachers: the list itself lives on the
dashboard (teacher/dashboard/_notifications.blade.php), so
the bell is a counter that takes them there. --}}
{{ $teacherUnreadCount }}
@endif
@php($theme = Auth::user()?->theme ?? 'light')