@if ($impersonateNotification = Session::get('impersonate')) @endif
Selamat Datang, {{ auth()->user()->name }}
NAMA

{{ auth()->user()->name }}

NIP

{{ auth()->user()->userable->nip ?? '-' }}

STATUS WALI KELAS

@php if(auth()->user()->hasRole('walikelas')){ $activeTahunAjaran = \App\Models\TahunAjaran::where('is_active', true)->first(); $mappingWaliKelas = \App\Models\MappingWaliKelas::with('kelas')->where('tahun_ajaran_id', $activeTahunAjaran->id) ->where('guru_id', auth()->user()->model_id)->first(); if($mappingWaliKelas !== null){ echo 'YA, '; echo $mappingWaliKelas->kelas->nama_kelas; } else { echo 'TIDAK'; } } else { echo 'TIDAK'; } @endphp

TAHUN AJARAN

{{ \App\Models\TahunAjaran::where('is_active', true)->first()->nama_tahun_ajaran }}

SEMESTER

{{ \App\Models\Semester::where('is_active', true)->first()->nama }}