{{-- Dropdown Menu untuk User --}}
@php $initials = strtoupper(substr(Auth::user()->nama_lengkap, 0, 1) . (strlen(Auth::user()->nama_lengkap) > 1 ? substr(strstr(Auth::user()->nama_lengkap, ' '), 1, 1) : '')); if (empty(trim($initials))) { $initials = strtoupper(substr(Auth::user()->nama_lengkap, 0, 2)); } $roleColors = [ 'admin' => ['from' => 'from-red-400', 'to' => 'to-red-600'], 'kasir' => ['from' => 'from-blue-400', 'to' => 'to-blue-600'], 'mahasiswa' => ['from' => 'from-green-400', 'to' => 'to-green-600'], 'yayasan' => ['from' => 'from-indigo-400', 'to' => 'to-indigo-600'], ]; $avatarColors = $roleColors[Auth::user()->role] ?? $roleColors['mahasiswa']; @endphp