Tableau de bord

Reste à dépenser

{{ number_format($sections['depense']['totals']['reste'], 2, ',', ' ') }} €

@php $colors = [ 'revenu' => ['bg' => 'bg-positive-fill', 'row' => 'bg-positive-surface/40'], 'depense' => ['bg' => 'bg-negative-fill', 'row' => 'bg-negative-surface/40'], 'epargne' => ['bg' => 'bg-info-fill', 'row' => 'bg-info-surface/40'], ]; // Ordered to alternate light/dark shades so adjacent donut slices stay distinguishable // even without relying on the border stroke (WCAG 1.4.11 graphical-object contrast). $chartPalettes = [ 'revenu' => ['#15803d', '#4ade80', '#166534', '#86efac', '#16a34a', '#22c55e'], 'depense' => ['#991b1b', '#fb923c', '#c2410c', '#fdba74', '#dc2626', '#f97316'], 'epargne' => ['#1e40af', '#93c5fd', '#1d4ed8', '#bfdbfe', '#2563eb', '#60a5fa'], ]; @endphp

Analyse

@foreach ($types as $type) @php $section = $sections[$type->value]; @endphp

{{ $type->label() }}

@foreach ($section['rows'] as $row) @endforeach
Suivi budgétaire {{ Str::lower($type->label()) }}
Catégorie Tracked Budget % Compl. Reste Manque
{{ $row['category']->name }} {{ number_format($row['tracked'], 2, ',', ' ') }} € {{ number_format($row['budget'], 2, ',', ' ') }} €
{{ $row['pct'] }}%
{{ number_format($row['reste'], 2, ',', ' ') }} € @if ($row['manque'] > 0) Dépassement : @endif {{ number_format($row['manque'], 2, ',', ' ') }} €
Total {{ number_format($section['totals']['tracked'], 2, ',', ' ') }} € {{ number_format($section['totals']['budget'], 2, ',', ' ') }} € {{ number_format($section['totals']['reste'], 2, ',', ' ') }} € {{ number_format($section['totals']['manque'], 2, ',', ' ') }} €
@endforeach
@foreach ($types as $type) @php $top = $chartData[$type->value]; @endphp

Catégorie de {{ Str::lower($type->label()) }} (suivis)

@if ($top['labels']->isEmpty())

Aucun montant suivi.

@else
    @foreach ($top['labels'] as $i => $label)
  • {{ $label }} {{ number_format($top['data'][$i], 2, ',', ' ') }} €
  • @endforeach
@endif
Total {{ number_format($sections[$type->value]['totals']['tracked'], 2, ',', ' ') }} €
@endforeach
@once @push('scripts') @endpush @endonce