@php $user = auth()->user(); $userInitial = $user?->name ? strtoupper(mb_substr($user->name, 0, 1)) : 'U'; $profilePhotoUrl = $user?->profile_photo_path ? asset('storage/' . $user->profile_photo_path) : null; $unreadNotificationsCount = $user ? $user->unreadNotifications()->count() : 0; $recentNotifications = $user ? $user->notifications()->latest()->limit(6)->get() : collect(); @endphp
SIKOS
Sistem Informasi
Organisasi & Kegiatan
Dashboard
Profile Organisasi
Anggota Ekskul
Manajemen Kegiatan
Jadwal Kegiatan
Dokumentasi
Laporan Kegiatan
@csrf
Logout
@yield('title', 'Dashboard')
Selamat datang kembali,
{{ $user?->name ?? 'Ketua' }}
!
@if ($unreadNotificationsCount > 0)
{{ $unreadNotificationsCount > 9 ? '9+' : $unreadNotificationsCount }}
@endif
Notifikasi
@if ($unreadNotificationsCount > 0)
@csrf
Tandai semua dibaca
@endif
@forelse ($recentNotifications as $notification) @php $data = $notification->data; @endphp
{{ $data['title'] ?? 'Notifikasi' }}
{{ $data['message'] ?? '-' }}
{{ $notification->created_at?->diffForHumans() }}
@if (!empty($data['action_url']))
{{ $data['action_label'] ?? 'Lihat detail' }}
@endif @if (is_null($notification->read_at))
@csrf
Tandai dibaca
@endif
@empty
Belum ada notifikasi.
@endforelse
@if ($profilePhotoUrl)
@else {{ $userInitial }} @endif
{{ $user?->name ?? 'Tamu' }}
{{ $user?->role ?? '-' }}
@yield('content')
@yield('scripts')