|
{{ $i + 1 }}
|
{{ $person->name ?? 'Unnamed' }}
|
@if(!empty($person->medical))
@php
$medicalData = is_string($person->medical) ? json_decode($person->medical, true) : $person->medical;
@endphp
@if($medicalData && is_array($medicalData))
@foreach($medicalData as $condition)
@php
$medicalLabels = [
'no_medical' => ['label' => 'No Medical Conditions', 'icon' => 'bi-check-circle', 'color' => 'success'],
'heart_condition' => ['label' => 'Heart Condition', 'icon' => 'bi-heart-pulse', 'color' => 'danger'],
'asthma' => ['label' => 'Asthma', 'icon' => 'bi-lungs', 'color' => 'warning'],
'epilepsy' => ['label' => 'Epilepsy', 'icon' => 'bi-brain', 'color' => 'info'],
'broken_bones' => ['label' => 'Previous Broken Bones', 'icon' => 'bi-bone', 'color' => 'secondary'],
'dislocated_joints' => ['label' => 'Dislocated Joints', 'icon' => 'bi-hand-index', 'color' => 'secondary'],
'diabetes' => ['label' => 'Diabetes', 'icon' => 'bi-droplet', 'color' => 'warning'],
'water_contact_lenses' => ['label' => 'Water Contact Lenses', 'icon' => 'bi-eye', 'color' => 'info'],
'hearing_impairment' => ['label' => 'Hearing Impairment', 'icon' => 'bi-ear', 'color' => 'info'],
'pregnant' => ['label' => 'Pregnant', 'icon' => 'bi-gender-female', 'color' => 'primary']
];
$info = $medicalLabels[$condition] ?? ['label' => $condition, 'icon' => 'bi-exclamation-triangle', 'color' => 'warning'];
@endphp
{{ $info['label'] }}
@endforeach
@else
{{ $person->medical }}
@endif
@else
No Record
@endif
|
{{ $person->code ?? '-' }}
|
@endforeach