{{-- Evaluation content. Pass booleans: $editIntern, $editConsultant, $editDirector. Read-only sections are rendered as text. --}} @use('App\Models\InternEvaluation', 'E') @php $i = $evaluation->intern_data ?? []; $c = $evaluation->consultant_data ?? []; $internFields = [ 'duties_summary' => ['Summary of clinical duties performed', 'Wards, clinics, theatre and on-call duties during this period.', true], 'procedures' => ['Procedures performed / assisted', 'List key procedures and approximate numbers.', false], 'cases' => ['Notable cases managed', 'Briefly describe interesting or challenging cases.', false], 'learning_reflection' => ['Key learning & reflection', 'What you learned and areas you wish to improve.', true], ]; $err = fn ($k) => $errors->first($k); @endphp {{-- Section A: Intern --}}

Section A

Intern Progress Report

@unless($editIntern) Read only@endunless
@foreach($internFields as $key => [$label, $hint, $required])
@if($editIntern)

{{ $hint }}

@if($err("intern.$key"))

{{ $err("intern.$key") }}

@endif @else

{{ $i[$key] ?? '—' ?: '—' }}

@endif
@endforeach
@if($editIntern) @if($err('intern.leave_days'))

{{ $err('intern.leave_days') }}

@endif @else

{{ $i['leave_days'] ?? '—' }}

@endif
{{-- Section B: Consultant (hidden from the intern until it has content) --}} @if($editConsultant || ! empty($c))

Section B

Supervisory Consultant Assessment

@if($avg = $evaluation->averageRating()) {{ $avg }} / 5 @elseif(! $editConsultant) Read only @endif
@foreach(E::CRITERIA as $key => $label) @php $val = (int) old("consultant.ratings.$key", $c['ratings'][$key] ?? 0); @endphp
{{ $label }} @if($editConsultant)*@endif @if($err("consultant.ratings.$key")){{ $err("consultant.ratings.$key") }}@endif
@foreach(E::RATING_LABELS as $n => $word) @if($editConsultant) @else $val === $n, 'border-slmc-line bg-white text-slate-300' => $val !== $n])>{{ $n }} @endif @endforeach
@endforeach

1 Poor · 2 Below expected · 3 Satisfactory · 4 Good · 5 Excellent

@if($editConsultant) @if($err('consultant.overall'))

{{ $err('consultant.overall') }}

@endif @else

{{ E::OVERALL[$c['overall'] ?? ''] ?? '—' }}

@endif
@if($editConsultant) @if($err('consultant.remarks'))

{{ $err('consultant.remarks') }}

@endif @else

{{ $c['remarks'] ?? '—' }}

@endif
@endif {{-- Section C: Director --}} @if($editDirector || filled($evaluation->director_remarks))

Section C

Hospital Director Verification

@if($editDirector) @if($err('director_remarks'))

{{ $err('director_remarks') }}

@endif @else

{{ $evaluation->director_remarks }}

@endif
@endif