@extends('reports.pdf.layout')
@section('title', $data['meta']['title'])
@php
$meta = $data['meta'];
$kpis = $data['kpis'];
$trajectory = $data['trajectory'];
$objectives = $data['objectives'];
$actions = $data['actions'];
$fmtNum = function ($v, $unit = '') {
if ($v === null) return '—';
$s = is_numeric($v) ? number_format((float) $v, 0, ',', ' ') : (string) $v;
return trim($s . ' ' . $unit);
};
$lineW = 320; $lineH = 160; $linePadX = 30; $linePadY = 22;
$maxV = 0;
foreach ($trajectory as $t) {
if ($t['real'] !== null) $maxV = max($maxV, (float) $t['real']);
if ($t['target'] !== null) $maxV = max($maxV, (float) $t['target']);
if ($t['projection']!== null) $maxV = max($maxV, (float) $t['projection']);
}
$maxV = max($maxV, 1);
$minV = 300;
$lineSlot = count($trajectory) > 1 ? ($lineW - 2 * $linePadX) / (count($trajectory) - 1) : 0;
$valueY = function ($v) use ($lineH, $linePadY, $maxV, $minV) {
if ($v === null) return null;
$range = $maxV - $minV;
if ($range <= 0) return $lineH - $linePadY;
return $lineH - $linePadY - ((($v - $minV) / $range) * ($lineH - 2 * $linePadY));
};
@endphp
@section('content')
DADYCAR FLEET MANAGER
{{ $meta['title'] }}
Durabilité ESG
{{ $meta['code'] }}
Période : {{ $meta['period']['label'] }} · {{ $meta['site_label'] }} ·
{{ $meta['total_vehicles'] }} véhicules ·
Généré le {{ $meta['generated_at']->locale('fr')->isoFormat('D MMMM YYYY') }}
Indicateurs clés
Avancement obj. 2026
{{ $kpis['progress_2026']['value'] }}{{ $kpis['progress_2026']['unit'] }}
{{ $kpis['progress_2026']['delta_label'] }}
Trajectoire CO₂
{{ $kpis['co2_trajectory']['value'] }}
{{ $kpis['co2_trajectory']['delta_label'] }}
Risque non-atteinte
{{ $kpis['at_risk_objectives']['value'] }}{{ $kpis['at_risk_objectives']['unit'] }}
{{ $kpis['at_risk_objectives']['delta_label'] }}
Actions correctives
{{ $kpis['corrective_actions']['value'] }}{{ $kpis['corrective_actions']['unit'] }}
{{ $kpis['corrective_actions']['delta_label'] }}
Trajectoire CO₂ scope 1 — réel vs cible vs projection
Réel
Cible
Projection
Avancement des objectifs climatiques
@foreach ($objectives as $o)
{{ $o['label'] }}
{{ $o['value'] }} — {{ $o['meta'] }}
@endforeach
Actions correctives planifiées
| Action |
Impact attendu |
Coût |
Échéance |
@foreach ($actions as $a)
| {{ $a['action'] }} |
{{ $a['impact'] }} |
{{ $a['cost'] }} |
{{ $a['deadline'] }} |
@endforeach
@endsection