@props([ 'postSummary', 'usdToTndRate' => 4, 'modern' => false, ]) @php $rows = $postSummary['rows'] ?? []; $totals = $postSummary['totals'] ?? ['spend' => 0, 'conversions' => 0, 'interactions' => 0]; $maxSpend = max(collect($rows)->pluck('spend')->all() ?: [1]); if ($maxSpend <= 0) { $maxSpend = 1; } @endphp @if ($modern)
@else| Publication | Spend | Couverture | Interactions |
|---|---|---|---|
| {{ $row['post_name'] }} |
{{ number_format($row['spend'], 2, ',', ' ') }} $ {{ number_format($row['spend'] * $usdToTndRate, 2, ',', ' ') }} TND |
{{ $row['conversions'] > 0 ? number_format($row['conversions'], 0, ',', ' ') : '—' }} | {{ $row['interactions'] > 0 ? number_format($row['interactions'], 0, ',', ' ') : '—' }} |
| Aucune publication avec metriques pour cette selection. | |||
| Total |
{{ number_format($totals['spend'], 2, ',', ' ') }} $ {{ number_format($totals['spend'] * $usdToTndRate, 2, ',', ' ') }} TND |
{{ number_format($totals['conversions'], 0, ',', ' ') }} | {{ number_format($totals['interactions'], 0, ',', ' ') }} |