{{-- Reusable attendance-status badge. One source of truth for colour + label of every attendance value rendered in the dashboard (meetings index, meeting show, investor show meetings list, startup show meetings list, …). Adding a new attendance value is a single entry in the $palette map below. Usage: @include('admin.partials.attendance-badge', ['status' => $meeting->attendance_status]) --}} @php /** @var string|null $status */ $palette = [ 'coming' => ['fg' => '#1d4ed8', 'bg' => '#dbeafe', 'glyph' => '⏳'], 'attended' => ['fg' => '#065f46', 'bg' => '#d1fae5', 'glyph' => '✓'], 'not_attended' => ['fg' => '#991b1b', 'bg' => '#fee2e2', 'glyph' => '✗'], 'cancelled' => ['fg' => '#475569', 'bg' => '#e2e8f0', 'glyph' => '⊘'], // Backstop for any legacy `unknown` rows the backfill missed — // shown as a muted grey so they're easy to spot + correct. 'unknown' => ['fg' => '#94a3b8', 'bg' => '#f1f5f9', 'glyph' => '·'], ]; $key = (string) ($status ?? ''); $meta = $palette[$key] ?? ['fg' => '#94a3b8', 'bg' => '#f1f5f9', 'glyph' => '·']; $label = $key !== '' ? __('admin.meetings_admin.attendances.' . $key) : '—'; @endphp {{ $label }}