S

Comparaison des Inscriptions

Analyse croisée sur deux périodes

{{ $periode1_label }} vs {{ $periode2_label }}
{{-- Filtres --}}
@if($centre_id && $centre_id != 0) {{ getCenterName($centre_id) }} @endif @if($domaine_id && $domaine_id != 0) {{ getDomaineName($domaine_id) }} @endif @if($filiere_id && $filiere_id != 0) {{ getFiliName($filiere_id) }} @endif @if($niveau_id && $niveau_id != 0) {{ getNiveauName($niveau_id) }} @endif @if($diplome_id && $diplome_id != 0) {{ getDiplomeName($diplome_id) }} @endif @if($langue_id && $langue_id != 0) {{ getLangueName($langue_id) }} @endif
@if ($dateError)
Période invalide {{ $dateError }}
@endif {{-- Panneau de filtres --}}
Année vs Année
Date vs Date
@if ($comparaison_type === 'annee') @else
@endif
@if ($comparaison_type === 'annee') @else
@endif
@if(auth()->user()->user_role_id == 7 || auth()->user()->user_role_id == 1)
@else
{{ auth()->user()->user_default_center()->centre_nom ?? '' }}
@endif
{{-- KPI --}}
@php $kpiLabels = [ 'inscriptions' => ['label' => 'Inscriptions totales', 'ic' => 'ic-teal', 'icon' => 'fa-user-plus'], 'nouvelles' => ['label' => 'Nouvelles inscriptions', 'ic' => 'ic-green', 'icon' => 'fa-user-check'], 'reins' => ['label' => 'Réinscriptions', 'ic' => 'ic-amber', 'icon' => 'fa-rotate-left'], 'preins' => ['label' => 'Préinscriptions', 'ic' => 'ic-slate', 'icon' => 'fa-pencil-alt'], ]; @endphp @foreach ($kpiLabels as $key => $info)
{{ $info['label'] }}
{{ number_format($kpi1[$key] ?? 0, 0, ',', ' ') }}
{{ number_format(abs($evolution[$key]['rel'] ?? 0), 1) }}% vs {{ $periode2_label }}
{{ $periode1_label }}
@endforeach

{{-- Insights --}}
@foreach ($kpiLabels as $key => $info) @if (in_array($key, ['inscriptions', 'nouvelles', 'reins']))
Écart {{ strtolower($info['label']) }}
{{ number_format($evolution[$key]['abs'] ?? 0, 0, ',', ' ') }} {{ ($evolution[$key]['rel'] ?? 0) >= 0 ? '+' : '' }}{{ number_format($evolution[$key]['rel'] ?? 0, 1) }} %
@endif @endforeach
{{-- Tableaux comparatifs --}} @php $secNum = 1; @endphp @foreach (['Domaine' => 'tableDomaine', 'Diplôme' => 'tableDiplome', 'Niveau' => 'tableNiveau'] as $label => $tableVar)
{{ sprintf('%02d', $secNum++) }}

Détail par {{ $label }}

@forelse($$tableVar as $row) @empty @endforelse
{{ $label }} {{ $periode1_label }} {{ $periode2_label }} Évol. Total
Inscription Réinscription Inscription Réinscription
{{ $row['nom'] }} {{ number_format($row['ins1'], 0, ',', ' ') }} {{ number_format($row['reins1'], 0, ',', ' ') }} {{ number_format($row['ins2'], 0, ',', ' ') }} {{ number_format($row['reins2'], 0, ',', ' ') }} {{ $row['evol_total'] >= 0 ? '+' : '' }}{{ number_format($row['evol_total'], 1) }}%
Aucune donnée
@endforeach
{{-- Pas de graphique, donc pas de script Chart.js --}}