{{-- resources/views/tableaubord/index.blade.php --}} @extends('layouts.app') @section('title', 'PTA ' . $annee . ' — Tableau de bord') @push('styles') @endpush @section('content')
| Code | Programmes / Actions / Résultats / Activités | Principaux extrants attendus en {{ $annee }} | Structure responsable / partenaires | Programmation Physique {{ $annee }} | Réalisations {{ $annee }} | Montants {{ $annee }} (FCFA) |
Sources de financement | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| T1 | T2 | T3 | T4 | T1 | T2 | T3 | T4 | ||||||
| {{ $prog['code'] }} | {{ $prog['nom'] }} | {{ number_format($prog['montant'] ?? 0, 0, ',', ' ') }} | |||||||||||
| {{ $act['code'] }} | {{ $act['nom'] }} | {{ number_format($act['montant'] ?? 0, 0, ',', ' ') }} | |||||||||||
| Résultat : {{ $res['nom'] }} | {{ number_format($res['montant'] ?? 0, 0, ',', ' ') }} | ||||||||||||
| {{ $av['code'] }} | {{ $av['nom'] }} | {{ $av['ext_nom'] ?? '—' }} | {{ $av['struct_code'] }} | {{-- Prévisions T1→T4 --}} @foreach(['prev_t1','prev_t2','prev_t3','prev_t4'] as $pt)@if($av[$pt] !== null) {{ (int)$av[$pt] }}% @else @endif | @endforeach {{-- Réalisations T1→T4 --}} @foreach(['real_t1','real_t2','real_t3','real_t4'] as $i => $rt) @php $pv = $av['prev_t' . ($i + 1)]; $rv = $av[$rt]; $cls = 'nd'; $pct = 0; if ($rv !== null) { if ($pv !== null && $pv > 0) { $ratio = ($rv / $pv) * 100; $pct = min(100, (int) round($ratio)); $cls = $ratio >= 80 ? 'ok' : ($ratio >= 50 ? 'mid' : 'lo'); } else { $cls = $rv >= 80 ? 'ok' : ($rv >= 50 ? 'mid' : 'lo'); } } @endphp@if($rv !== null) {{ (int)$rv }}% @if($pv !== null && $pv > 0) @endif @else @endif | @endforeach{{ number_format($av['montant'] ?? 0, 0, ',', ' ') }} | {{ $av['fin_nom'] ? Str::limit($av['fin_nom'], 8) : '—' }} | ||||||