@extends($layout) @section('title', 'طلبات الأنشطة') @section('content')

طلبات الأنشطة

عرض وإدارة طلبات الأنشطة

@if(!auth()->user()->hasRole('super-admin')) طلب جديد @endif
قيد الانتظار
{{ $stats['pending'] }}
مقبولة
{{ $stats['approved'] }}
مرفوضة
{{ $stats['rejected'] }}
@forelse($activityRequests as $activityRequest)
{{ $activityRequest->activityType->icon ?? '📅' }}

{{ $activityRequest->activityType->display_name }}

{{ $activityRequest->user->name }} {{ $activityRequest->created_at->diffForHumans() }}

التاريخ
{{ $activityRequest->requested_date->format('Y/m/d') }}
الوقت
{{ $activityRequest->requested_time->format('H:i') }}
المدة
{{ $activityRequest->duration_hours }}س {{ $activityRequest->duration_minutes }}د
إلى
{{ $activityRequest->recipient->name }}
@if($activityRequest->request_notes)

ملاحظات الطلب:

{{ $activityRequest->request_notes }}

@endif @if($activityRequest->response_notes)

{{ $activityRequest->status === 'approved' ? 'ملاحظات القبول:' : 'سبب الرفض:' }}

{{ $activityRequest->response_notes }}

@if($activityRequest->reviewer)

بواسطة: {{ $activityRequest->reviewer->name }} - {{ $activityRequest->reviewed_at->diffForHumans() }}

@endif
@endif
@php $statusBadges = [ 'pending' => ['bg' => 'bg-yellow-100 dark:bg-yellow-900/30', 'text' => 'text-yellow-800 dark:text-yellow-200', 'label' => 'قيد الانتظار', 'icon' => 'M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z'], 'approved' => ['bg' => 'bg-green-100 dark:bg-green-900/30', 'text' => 'text-green-800 dark:text-green-200', 'label' => 'مقبول', 'icon' => 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'], 'rejected' => ['bg' => 'bg-red-100 dark:bg-red-900/30', 'text' => 'text-red-800 dark:text-red-200', 'label' => 'مرفوض', 'icon' => 'M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z'] ]; $badge = $statusBadges[$activityRequest->status] ?? ['bg' => 'bg-gray-100', 'text' => 'text-gray-800', 'label' => $activityRequest->status, 'icon' => 'M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z']; @endphp {{ $badge['label'] }} @if($activityRequest->status === 'pending') @if($activityRequest->recipient_id === auth()->id())
@elseif($activityRequest->user_id === auth()->id()) @endif @endif @if($activityRequest->liveActivity) @endif
@empty

لا توجد طلبات

لم يتم العثور على أي طلبات

@endforelse
@if($activityRequests->hasPages())
{{ $activityRequests->links() }}
@endif
{{-- Review Modal --}} @endsection