+
+ {{-- ═══ HEADER ═══════════════════════════════════════════════════════ --}}
+
+
+ {{-- ═══ CONTENT ════════════════════════════════════════════════════════ --}}
+
+
+ {{-- ─── Meta Block ─────────────────────────────────────────────── --}}
+
+
+ {{-- ─── Question Groups ─────────────────────────────────────── --}}
+ @php
+ // Key answers by question_id for fast lookup
+ $answersMap = $session->answers->keyBy('question_id');
+ @endphp
+
+ @foreach ($questionGroups as $groupIndex => $group)
+
+
+
+ {{-- Group heading --}}
+
+
+ {{-- Questions --}}
+
+ @forelse ($group->questions as $question)
+ @php
+ $answer = $answersMap->get($question->id);
+ $answerValue = $answer?->value;
+ $textValue = $answer?->text_value;
+
+ $pillClass = match ($answerValue) {
+ 'yes' => 'answer-pill answer-yes',
+ 'no' => 'answer-pill answer-no',
+ 'na' => 'answer-pill answer-na',
+ default => '',
+ };
+ $pillLabel = match ($answerValue) {
+ 'yes' => 'Yes',
+ 'no' => 'No',
+ 'na' => 'N/A',
+ default => null,
+ };
+ @endphp
+
+
+
+
+ |
+ {{ $question->text }}
+ @if (!empty($textValue))
+ {{ $textValue }}
+ @endif
+ |
+
+ @if ($pillLabel !== null)
+ {{ $pillLabel }}
+ @else
+ Not answered
+ @endif
+ |
+
+
+
+
+ @empty
+
+ No questions in this group.
+
+ @endforelse
+
+
+ @endforeach
+
+ {{-- ─── Additional Comments ─────────────────────────────────── --}}
+ @if (!empty($session->additional_comments))
+
+
+
+ @endif
+
+ {{-- ─── Footer ──────────────────────────────────────────────── --}}
+
+
+