@php /** @var \App\Models\User $user */ $user = auth()->user(); $role = $user->membership_status ?? $user->role ?? 'member'; switch ($role) { case 'super-admin': $layout = 'layouts.superadmin'; break; case 'advisor': $layout = 'layouts.advisor'; break; case 'admin': case 'moderator': $layout = 'layouts.admin'; break; default: $layout = 'layouts.member'; } /** @var \Illuminate\Support\Collection|\Illuminate\Pagination\LengthAwarePaginator $notes */ $notes = $notes ?? collect(); @endphp @extends($layout) @section('title', 'ملاحظات إدارية عن الدعوات') @section('content') @php if (is_array($notes)) { $notes = collect($notes); } @endphp
{{-- هيدر ملحمي --}}
ملاحظات إدارية — نظام الدعوات

ملاحظات الإدارة حول دعواتك

هنا تظهر الرسائل الرسمية من الإدارة بخصوص طريقة استخدام رابط الدعوة، جودة الأعضاء الذين قمت بدعوتهم، وتنبيهات أو مديح عن مساهمتك في نمو جيش الوفاء الذهبي.

إجمالي الملاحظات
{{ $notes instanceof \Illuminate\Pagination\LengthAwarePaginator ? $notes->total() : $notes->count() }}
ملاحظات تحتاج انتباه
{{ (int)($highlightCount ?? 0) }}
@if(session('success'))
{{ session('success') }}
@endif
{{-- فاصل بسيط --}}
{{-- توضيح قصير --}}

تنبيه مهم: بعض الملاحظات قد تتعلّق بجودة الأشخاص الذين تدعوهم، تفاعلهم مع البرنامج، أو قرارات الإدارة بالموافقة / الرفض على احتساب دعوات معيّنة. القراءة الجيدة لهذه الملاحظات تساعدك على تحسين نوعية الدعوات القادمة.

{{-- الملاحظات --}} @if($notes->isEmpty())
لا توجد ملاحظات إدارية حتى الآن
عندما تضيف الإدارة ملاحظات على نظام الدعوات الخاص بك، ستظهر هنا بشكل منظم، لتعرف أين تبرع وأين تحتاج إلى تحسين.
@else
@foreach($notes as $note) @php /** @var \App\Models\InviteNote|null $note */ $type = $note->type ?? 'info'; // info / warning / praise $isWarning = $type === 'warning'; $isPraise = $type === 'praise'; $badgeClass = $isWarning ? 'bg-rose-500/15 border-rose-400/60 text-rose-100' : ($isPraise ? 'bg-emerald-500/15 border-emerald-400/60 text-emerald-100' : 'bg-sky-500/15 border-sky-400/60 text-sky-100'); $badgeText = $isWarning ? 'تنبيه إداري' : ($isPraise ? 'إشادة من الإدارة' : 'ملاحظة عامة'); @endphp
{{ $badgeText }}

{{ $note->title ?? 'ملاحظة بدون عنوان' }}

{{ optional($note->created_at)->diffForHumans() ?? '—' }}
@if($note->createdBy?->name)
من: {{ $note->createdBy->name }}
@endif

{{ $note->body ?? '—' }}

@if(!empty($note->admin_hint))
نصيحة عملية: {{ $note->admin_hint }}
@endif @if(isset($note->related_invites_count) && $note->related_invites_count > 0)
تتعلق بـ {{ $note->related_invites_count }} دعوة/دعوات @if(!empty($note->tag)) #{{ $note->tag }} @endif
@endif
@endforeach
@if($notes instanceof \Illuminate\Pagination\LengthAwarePaginator)
{{ $notes->links() }}
@endif @endif
@endsection