@extends('pages.index') @section('admin_content')

Notifikasi

Kelola semua pemberitahuan Anda di sini

@if(isset($notifications) && $notifications->count() > 0)
@foreach($notifications as $notification) @php $sender = $notification->sender; $senderName = $sender ? $sender->display_name : 'Sistem'; $senderRole = $sender ? $sender->role : 'system'; $senderLabel = $sender ? $sender->role_label : 'Sistem'; $senderEmail = $sender->email ?? null; $className = $notification->class?->name ?? '-'; @endphp
@csrf @method('DELETE')

{{ $notification->title }}

{{ $notification->created_at?->format('d M Y H:i') }}

{{ Str::limit($notification->body, 100) }}

{{ $senderName }} @switch($senderRole) @case('admin') @break @case('teacher') @break @case('student') @break @default @endswitch {{ $senderLabel }} @if($notification->class) {{ $className }} @endif
@endforeach
@else

Tidak ada notifikasi

Belum ada notifikasi baru untuk Anda saat ini.

@endif
@endsection