@extends($layout) @section('title', 'تفاصيل النشاط') @section('content')
@if($activity->activityType->icon === 'video') @elseif($activity->activityType->icon === 'users') @else @endif

{{ $activity->activityType->display_name }}

@if($activity->title)

{{ $activity->title }}

@endif

التاريخ

{{ $activity->scheduled_date->format('Y-m-d') }}

الوقت

{{ date('h:i A', strtotime($activity->scheduled_time)) }}

المدة

{{ $activity->duration }}

{{ $activity->status_label }}
@if($activity->description)

الوصف

{{ $activity->description }}

@endif

المشاركين ({{ $activity->participants->count() }})

@foreach($activity->participants as $participant)
{{ $participant->user->name }} @if($participant->proof_uploaded_at && !$participant->reviewed_at)
@elseif($participant->excuse_submitted_at && !$participant->reviewed_at)
@elseif($participant->status === 'confirmed')
@endif

{{ $participant->user->name }}

{{ $participant->user->email }}

{{ $participant->status_label }} @if($participant->total_points != 0)
{{ $participant->total_points > 0 ? '+' : '' }}{{ $participant->total_points }}
@endif @if($activity->canUserManage(auth()->user())) {{-- منع المراجعة غير المصرحة: المشرف لا يراجع نفسه أو مشرف آخر --}} @php $canReview = false; $reviewMessage = ''; if(auth()->user()->hasRole('super-admin')) { // السوبر أدمن يراجع الجميع $canReview = true; } elseif($participant->user_id === auth()->user()->id) { // المشرف لا يراجع نفسه $reviewMessage = 'يحتاج مراجعة من السوبر أدمن'; } elseif($participant->user->hasRole('moderator')) { // المشرف لا يراجع مشرف آخر $reviewMessage = 'يحتاج مراجعة من السوبر أدمن'; } else { // المشرف يراجع الأعضاء العاديين $canReview = true; } @endphp @if($canReview) @if($participant->proof_uploaded_at && !$participant->reviewed_at) @elseif($participant->excuse_submitted_at && !$participant->reviewed_at) @endif @else {{-- رسالة للحالات التي تحتاج مراجعة من السوبر أدمن --}} @if(($participant->proof_uploaded_at || $participant->excuse_submitted_at) && !$participant->reviewed_at)
{{ $reviewMessage }}
@endif @endif @endif
@if($participant->moderator_notes)

ملاحظات المشرف:

{{ $participant->moderator_notes }}

@endif @endforeach

تفاصيل إضافية

أنشأ بواسطة {{ $activity->creator->name }}
نوع الطلب {{ $activity->request_type === 'official' ? 'طلب رسمي' : 'طلب عضو' }}
تاريخ الإنشاء {{ $activity->created_at->format('Y-m-d') }}
@if($activity->canUserManage(auth()->user())) @if(!$activity->isPast())

الإجراءات

تعديل النشاط
@endif @endif
@if($activity->canUserManage(auth()->user())) @endif @endsection