@php use Illuminate\Support\Carbon; @endphp @extends('layouts.app') @section('title', 'الإشعارات') @section('content')

🔔 الإشعارات

تحديد الكل كمقروء @php $role = auth()->user()->role ?? 'admin'; $dashboardRoutes = [ 'admin' => 'admin.dashboard', 'sales' => 'sales.pipeline', 'sales_manager' => 'sales.pipeline', 'finance' => 'finance.dashboard', 'operations' => 'operations.dashboard', 'applications' => 'admission.pipeline', 'hr' => 'hr.dashboard', 'admission' => 'admission.pipeline', ]; $dashboardRoute = route($dashboardRoutes[$role] ?? 'admin.dashboard'); @endphp العودة
@if (is_object($notifications) && $notifications->count() > 0) @foreach ($notifications as $n)
@switch($n->type) @case('lead_assigned') 💼 @break @case('lead_status') 🔄 @break @case('commission') 💰 @break @case('reminder') 🔔 @break @case('admission') 📋 @break @case('payroll') 📄 @break @case('warning') ⚠️ @break @case('teacher_payout') 🎓 @break @default 📌 @endswitch

{{ $n->title }}

{{ Carbon::parse($n->created_at)->diffForHumans() }}
@if ($n->message)

{{ $n->message }}

@endif
@if (!$n->is_read) @endif
@endforeach
{{ $notifications->links() }}
@else
🔕

لا توجد إشعارات

ستظهر هنا الإشعارات الجديدة عند ورودها

@endif
@endsection @push('scripts') @endpush