@extends('crm.layouts.app') @section('title', 'Health Questionnaire Details') @section('content')
{{ $healthQuestionnaire->description }}
@endif{{ session('success') }}
{{ $question['question'] }}
@if($question['type'] === 'multiple_choice' && isset($question['options']))This questionnaire doesn't have any questions yet.
| Client | Health Score | Risk Level | Status | Submitted |
|---|---|---|---|---|
| {{ $response->client->name ?? 'Unknown Client' }} | @if($response->health_score) {{ number_format($response->health_score, 1) }} @else — @endif | @php $riskLevel = $response->getHealthRisk(); $riskBadge = match($riskLevel) { 'low' => 'bg-green-50 text-green-700 ring-green-600/20', 'medium' => 'bg-yellow-50 text-yellow-800 ring-yellow-600/20', 'high' => 'bg-orange-50 text-orange-700 ring-orange-600/20', 'very_high' => 'bg-red-50 text-red-700 ring-red-600/20', default => 'bg-gray-50 text-gray-600 ring-gray-500/10' }; @endphp {{ $response->getHealthRiskLabel() }} | @php $status = $response->getStatus(); $statusBadge = match($status) { 'approved' => 'bg-green-50 text-green-700 ring-green-600/20', 'rejected' => 'bg-red-50 text-red-700 ring-red-600/20', 'pending' => 'bg-yellow-50 text-yellow-800 ring-yellow-600/20', 'incomplete' => 'bg-gray-50 text-gray-600 ring-gray-500/10', default => 'bg-gray-50 text-gray-600 ring-gray-500/10' }; @endphp {{ ucfirst($status) }} | {{ $response->completed_at ? $response->completed_at->format('M j, Y') : $response->created_at->format('M j, Y') }} |