@extends('backoffice.dashboard') @section('content') @php $user = Auth::user(); @endphp @php use App\Models\Type; $types_G = Type::orderBy('id_type', 'asc')->get(); @endphp @php $hasInvestmentPermission = $user->hasPermission(20) || $user->hasPermission(31) || $user->hasPermission(36) || $user->hasPermission(42) || $user->hasPermission(48) || $user->hasPermission(54) || $user->hasPermission(60); $hasFinPermission = $user->hasPermission(66) || $user->hasPermission(72); $hasManifestationPermission = $user->hasPermission(77) || $user->hasPermission(83); $hasAubergePermission = $user->hasPermission(115) || $user->hasPermission(117) || $user->hasPermission(119); @endphp

لوحة القيادة

المعايير

إعادة تعيين
@if ($user && $hasInvestmentPermission)

إحصائيات الاستثمار

متابعة طلبات الاستثمار في المجال الرياضي والشبابي

إجمالي الطلبات

{{ $totaux['total'] }}
جميع المشاريع

قيد المعالجة

{{ $totaux['en_cours'] }}
{{ $totaux['total'] > 0 ? round($totaux['en_cours'] / $totaux['total'] * 100, 1) : 0 }}%

مقبولة

{{ $totaux['accepte'] }}
{{ $totaux['total'] > 0 ? round($totaux['accepte'] / $totaux['total'] * 100, 1) : 0 }}%

مرفوضة

{{ $totaux['refuse'] }}
{{ $totaux['total'] > 0 ? round($totaux['refuse'] / $totaux['total'] * 100, 1) : 0 }}%

قاعات رياضية

مشاريع البنية التحتية الرياضية

الإجمالي {{ $sallesSport['total'] }}
قيد المعالجة {{ $sallesSport['en_cours'] }}
مقبولة {{ $sallesSport['accepte'] }}
مرفوضة {{ $sallesSport['refuse'] }}

بداية النشاط

طلبات بدء النشاط الرياضي

الإجمالي {{ $debutActivite['total'] }}
قيد المعالجة {{ $debutActivite['en_cours'] }}
مقبولة {{ $debutActivite['accepte'] }}
مرفوضة {{ $debutActivite['refuse'] }}

الشباب - مؤسسات

المؤسسات الخاصة للشباب

الإجمالي {{ $jeunesseInstitutions['total'] }}
قيد المعالجة {{ $jeunesseInstitutions['en_cours'] }}
مقبولة {{ $jeunesseInstitutions['accepte'] }}
مرفوضة {{ $jeunesseInstitutions['refuse'] }}

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

أنشطة الشباب والطفل

الإجمالي {{ $jeunesseActivites['total'] }}
قيد المعالجة {{ $jeunesseActivites['en_cours'] }}
مقبولة {{ $jeunesseActivites['accepte'] }}
مرفوضة {{ $jeunesseActivites['refuse'] }}

الفضاءات الترفيهية للشباب و الطفولة

مشاريع الترفيه للأطفال

الإجمالي {{ $jeuneEnfant['total'] }}
قيد المعالجة {{ $jeuneEnfant['en_cours'] }}
مقبولة {{ $jeuneEnfant['accepte'] }}
مرفوضة {{ $jeuneEnfant['refuse'] }}

التكوين والتدريب

الاستثمار الرياضي

الإجمالي {{ $formationStage['total'] }}
قيد المعالجة {{ $formationStage['en_cours'] }}
مقبولة {{ $formationStage['accepte'] }}
مرفوضة {{ $formationStage['refuse'] }}
@endif @if ($user && $hasFinPermission)

إدارة التمويلات

طلبات التمويل للجمعيات والمشاريع

إجمالي التمويلات

{{ $totauxFinancements['total'] }}
جميع الطلبات

قيد المعالجة

{{ $totauxFinancements['en_cours'] }}
{{ $totauxFinancements['total'] > 0 ? round($totauxFinancements['en_cours'] / $totauxFinancements['total'] * 100, 1) : 0 }}%

مقبولة

{{ $totauxFinancements['accepte'] }}
{{ $totauxFinancements['total'] > 0 ? round($totauxFinancements['accepte'] / $totauxFinancements['total'] * 100, 1) : 0 }}%

مرفوضة

{{ $totauxFinancements['refuse'] }}
{{ $totauxFinancements['total'] > 0 ? round($totauxFinancements['refuse'] / $totauxFinancements['total'] * 100, 1) : 0 }}%

طلبات التمويل

تمويل الجمعيات والمشاريع

الإجمالي {{ $financements['total'] }}
قيد المعالجة {{ $financements['en_cours'] }}
مقبولة {{ $financements['accepte'] }}
مرفوضة {{ $financements['refuse'] }}
@endif @if ($user && $hasManifestationPermission)

إدارة تنظيم التظاهرات الرياضية

طلبات التظاهرات الرياضية الوطنية والدولية

إجمالي التظاهرات

{{ $totauxManifestations['total'] }}
جميع التظاهرات

قيد المعالجة

{{ $totauxManifestations['en_cours'] }}
{{ $totauxManifestations['total'] > 0 ? round($totauxManifestations['en_cours'] / $totauxManifestations['total'] * 100, 1) : 0 }}%

مقبولة

{{ $totauxManifestations['accepte'] }}
{{ $totauxManifestations['total'] > 0 ? round($totauxManifestations['accepte'] / $totauxManifestations['total'] * 100, 1) : 0 }}%

مرفوضة

{{ $totauxManifestations['refuse'] }}
{{ $totauxManifestations['total'] > 0 ? round($totauxManifestations['refuse'] / $totauxManifestations['total'] * 100, 1) : 0 }}%

التظاهرات الوطنية

طلبات التظاهرات الرياضية الوطنية

الإجمالي {{ $manifestationsNationales['total'] }}
قيد المعالجة {{ $manifestationsNationales['en_cours'] }}
مقبولة {{ $manifestationsNationales['accepte'] }}
مرفوضة {{ $manifestationsNationales['refuse'] }}

التظاهرات الدولية

طلبات التظاهرات الرياضية الدولية

الإجمالي {{ $manifestationsInternationales['total'] }}
قيد المعالجة {{ $manifestationsInternationales['en_cours'] }}
مقبولة {{ $manifestationsInternationales['accepte'] }}
مرفوضة {{ $manifestationsInternationales['refuse'] }}
@endif @php $user = Auth::user(); // Vérifier si l'utilisateur a la permission d'accéder aux stats Auberges $hasAubergePermission = $user->hasPermission(115) || $user->hasPermission(117) || $user->hasPermission(119); // Initialiser toutes les variables avec des valeurs par défaut $totauxReservations = [ 'total' => 0, 'en_cours' => 0, 'total_auberges' => 0, 'capacite_totale' => 0 ]; $reservations = [ 'total' => 0, 'en_cours' => 0, 'accepte' => 0, 'refuse' => 0 ]; $auberges = [ 'total' => 0, 'epa' => 0, 'non_epa' => 0, 'capacite_totale' => 0 ]; // Stats pour rôle 7 (auberge spécifique) if ($user->roles->pluck('id_roles')->contains(7) && $user->auberge) { $auberge = $user->auberge; $totauxReservations['total'] = $auberge->reservations->count(); $totauxReservations['en_cours'] = $auberge->reservations->where('status', 'en_cours')->count(); $totauxReservations['total_auberges'] = 1; $totauxReservations['capacite_totale'] = $auberge->capacite_totale; $reservations['total'] = $auberge->reservations->count(); $reservations['en_cours'] = $auberge->reservations->where('status', 'en_cours')->count(); $reservations['accepte'] = $auberge->reservations->where('status', 'accepte')->count(); $reservations['refuse'] = $auberge->reservations->where('status', 'refuse')->count(); $auberges['total'] = 1; $auberges['epa'] = $auberge->epa ? 1 : 0; $auberges['non_epa'] = $auberge->epa ? 0 : 1; $auberges['capacite_totale'] = $auberge->capacite_totale; } // Stats globales pour les autres utilisateurs // Vous pouvez ici remplir $totauxReservations, $reservations, $auberges depuis le contrôleur @endphp @if(($user->roles->pluck('id_roles')->contains(7) && $user->auberge) || $hasAubergePermission)

إحصائيات الحجوزات والإقامة

إدارة الحجوزات @if($user->roles->pluck('id_roles')->contains(7) && $user->auberge) {{ $user->auberge->nom_ar }} @else والمركبات ومراكز إقامة الشباب @endif

إجمالي الحجوزات

{{ $totauxReservations['total'] ?? 0 }}
جميع الحجوزات

قيد المعالجة

{{ $totauxReservations['en_cours'] ?? 0 }}
{{ $totauxReservations['total'] > 0 ? round($totauxReservations['en_cours'] / $totauxReservations['total'] * 100, 1) : 0 }}%

مراكز الإقامة

{{ $totauxReservations['total_auberges'] ?? 0 }}
مركز نشط

السعة الإجمالية

{{ $totauxReservations['capacite_totale'] ?? 0 }}
سرير

إدارة الحجوزات

حجوزات مراكز الإقامة

الإجمالي {{ $reservations['total'] ?? 0 }}
قيد المعالجة {{ $reservations['en_cours'] ?? 0 }}
مقبولة {{ $reservations['accepte'] ?? 0 }}
مرفوضة {{ $reservations['refuse'] ?? 0 }}

مراكز الإقامة

المركبات ومراكز إقامة الشباب

الإجمالي {{ $auberges['total'] ?? 0 }}
EPA {{ $auberges['epa'] ?? 0 }}
غير EPA {{ $auberges['non_epa'] ?? 0 }}
السعة الإجمالية {{ $auberges['capacite_totale'] ?? 0 }}
@endif @if ($user && $user->hasPermission(1))

إدارة المناظرات

المناظرات وطلبات الترشح

إجمالي المناظرات

{{ $totauxConcours['total_concours'] }}
مناظرة مفتوحة

إجمالي المترشحين

{{ $totauxConcours['total_candidats'] }}
مترشح

قيد الدراسة

{{ $totauxConcours['en_cours'] }}
{{ $totauxConcours['total_candidats'] > 0 ? round($totauxConcours['en_cours'] / $totauxConcours['total_candidats'] * 100, 1) : 0 }}%

قبول نهائي

{{ $totauxConcours['accepte_definitif'] }}
{{ $totauxConcours['total_candidats'] > 0 ? round($totauxConcours['accepte_definitif'] / $totauxConcours['total_candidats'] * 100, 1) : 0 }}%

المناظرات

إدارة المناظرات والمترشحين

مترشحين {{ $concours['total_candidats'] }}
قيد الدراسة {{ $concours['en_cours'] }}
قبول نهائي {{ $concours['accepte_definitif'] }}
مرفوض {{ $concours['refuse'] }}
@endif
@endsection