@php $postVolumeSeries = $postVolumeSeries ?? ['dates' => [], 'counts' => [], 'total' => 0]; $hasDailyData = count($dailySeries['dates'] ?? $dailySeries['labels'] ?? []) > 0; $hasPostChartData = count($postChartData['labels'] ?? []) > 0; $hasPostVolumeData = count($postVolumeSeries['dates'] ?? []) > 0; $dailyFromPosts = (bool) ($dailySeries['from_posts'] ?? false); @endphp @if ($hasDailyData || $hasPostChartData || $hasPostVolumeData)
@if ($hasDailyData || $hasPostVolumeData)
@if ($hasDailyData)

Evolution

@if ($dailyFromPosts) Interactions publications (Insights page indisponibles). @else Une metrique a la fois pour une lecture claire. @endif

@unless ($dailyFromPosts)
@endunless
@endif @if ($hasPostVolumeData)

Publications publiees

Nombre de posts sur la periode

@unless ($hasDailyData)
@endunless
@endif
@endif @if ($hasPostChartData)

Top 5 publications

Classees par interactions totales sur la periode.

Reactions Commentaires Partages
@foreach ($postChartData['labels'] as $index => $label) @php $reactions = (int) ($postChartData['reactions'][$index] ?? 0); $comments = (int) ($postChartData['comments'][$index] ?? 0); $shares = (int) ($postChartData['shares'][$index] ?? 0); $total = (int) ($postChartData['total_engagement'][$index] ?? ($reactions + $comments + $shares)); @endphp

#{{ $index + 1 }} {{ $label }}

{{ number_format($reactions, 0, ',', ' ') }} reactions {{ number_format($comments, 0, ',', ' ') }} commentaires {{ number_format($shares, 0, ',', ' ') }} partages

Total {{ number_format($total, 0, ',', ' ') }}

@endforeach
@endif
@endif