@extends('layouts.moderator') @section('title', 'تفاصيل المسابقة') @push('meta') @endpush @section('content')

{{ $competition->title }}

@if($competition->status === 'active')
نشطة
@elseif($competition->status === 'ended') منتهية @else مسودة @endif

{{ $competition->description }}

منشئ: {{ $competition->creator->name }}
@if($competition->start_date)
بدء: {{ $competition->start_date->format('Y/m/d H:i') }}
@endif @if($competition->has_end_date && $competition->end_date)
نهاية: {{ $competition->end_date->format('Y/m/d H:i') }}
@endif
إنشاء: {{ $competition->created_at->format('Y/m/d') }}
@if($competition->status !== 'ended') تعديل @endif @if($competition->status === 'draft') @elseif($competition->status === 'active') @endif

إجمالي المشاركين

{{ $stats['total_participants'] }}

المؤهلين

{{ $stats['qualified_participants'] }}

الفائزين

{{ $stats['winners'] }}

الإرسالات

{{ $stats['total_submissions'] }}

تفاصيل المسابقة

الوصف

{{ $competition->description }}

@if($competition->terms && count($competition->terms) > 0)

شروط المسابقة

    @foreach($competition->terms as $term)
  • {{ $term }}
  • @endforeach
@endif

فئات المشاركين المسموحة

@foreach($competition->participant_types_text as $type) {{ $type }} @endforeach

حالة المسابقة

تم الإنشاء

{{ $competition->created_at->format('Y/m/d H:i') }}

@if($competition->status === 'active')

نشطة حالياً

يمكن للمشاركين رفع الإثباتات

@elseif($competition->status === 'ended')

انتهت المسابقة

@if($competition->ended_at)

{{ $competition->ended_at->format('Y/m/d H:i') }}

@endif
@else

مسودة

لم يتم تفعيلها بعد

@endif

إدارة الفائزين

عرض جميع الفائزين

إجمالي الفائزين

{{ $competition->participants()->where('status', 'winner')->count() }}

المؤهلون للفوز

{{ $competition->participants()->where('status', 'qualified')->count() }}

النقاط الممنوحة

{{ number_format($competition->participants()->where('status', 'winner')->sum('awarded_points')) }}

الرتب الممنوحة

{{ $competition->participants()->where('status', 'winner')->whereNotNull('awarded_rank_id')->count() }}

@if($recentWinners->count() > 0)

آخر الفائزين

@foreach($recentWinners as $winner)
@if($winner->user->avatar) {{ $winner->user->name }} @else
@endif
{{ $winner->user->name }}
{{ $winner->won_at ? $winner->won_at->diffForHumans() : 'منذ وقت قريب' }}
@if($winner->awarded_points > 0) {{ number_format($winner->awarded_points) }} نقطة @endif @if($winner->awardedRank) {{ $winner->awardedRank->name }} @endif
@endforeach
@else

لا يوجد فائزون بعد

لم يتم اختيار أي فائزين في هذه المسابقة حتى الآن

@if($competition->participants()->where('status', 'qualified')->count() > 0) اختيار الفائزين الآن @endif
@endif

آخر الأنشطة

@if($competition->submissions()->latest()->limit(5)->count() > 0)
@foreach($competition->submissions()->with(['user', 'reviewer'])->latest()->limit(5)->get() as $submission)
{{ substr($submission->user->name, 0, 1) }}

{{ $submission->user->name }}

رفع إثبات • {{ $submission->time_from_submission }}

{{ $submission->status_text }}
@endforeach
@else

لا توجد أنشطة حديثة

لم يتم رفع أي إثباتات بعد

@endif
@endsection