{{-- One banner + table block of the Salad Summary PDF (a day, or the whole period). Expects: $title, $bg (banner colour), $rows (array of ['salad_name' => ..., metric => int]), $totalLabel, $totals (metric => int), $metrics (ordered metric keys). Styles come from pdf/salad-summary.blade.php, which is always written first in the same document. --}} @php $n = fn($v) => (int) $v === 0 ? '0' : (int) $v; $clean = fn($s) => trim(preg_replace('/[\x{1F000}-\x{1FFFF}\x{2600}-\x{27BF}\x{FE0F}\x{200D}]/u', '', (string) $s)); @endphp
{!! $title !!}
@foreach ($rows as $s) @foreach ($metrics as $k)@endforeach @endforeach @foreach ($metrics as $k)@endforeach
Salad Total BowlsInstantScheduledSubscription PreparedKitchen PendingDeliveredNot Delivered / Skipped
{{ $clean($s['salad_name']) }}{!! $n($s[$k]) !!}
{{ $totalLabel }}{{ $totals[$k] }}