{{-- Workflow position: Intern → Consultant → Director → SLMC. @include('partials.evaluation.stepper', ['evaluation' => $e]) --}} @use('App\Models\InternEvaluation', 'E') @php $steps = [ ['Intern', 'ri-user-heart-line', 'Prepares & submits'], ['Consultant', 'ri-stethoscope-line', 'Reviews & approves'], ['Director', 'ri-hospital-line', 'Verifies & approves'], ['SLMC', 'ri-government-line', 'Received & locked'], ]; $current = [ E::DRAFT => 0, E::RETURNED_TO_INTERN => 0, E::WITH_CONSULTANT => 1, E::RETURNED_TO_CONSULTANT => 1, E::WITH_DIRECTOR => 2, E::LOCKED => 4, ][$evaluation->status] ?? 0; $returned = in_array($evaluation->status, [E::RETURNED_TO_INTERN, E::RETURNED_TO_CONSULTANT], true); @endphp
    @foreach($steps as $i => [$label, $icon, $hint]) @php $state = $i < $current ? 'done' : ($i === $current ? ($returned ? 'returned' : 'current') : 'pending'); if ($evaluation->isLocked()) $state = 'done'; @endphp
  1. $state === 'done', 'border-blue-300 bg-white shadow-md ring-4 ring-blue-100' => $state === 'current', 'border-orange-300 bg-white shadow-md ring-4 ring-orange-100' => $state === 'returned', 'border-slmc-line bg-white/60' => $state === 'pending', ])> $state === 'done', 'bg-slmc text-white' => $state === 'current', 'bg-orange-500 text-white' => $state === 'returned', 'bg-slate-100 text-slate-400' => $state === 'pending', ])> Step {{ $i + 1 }} {{ $label }} {{ $state === 'returned' ? 'Changes requested' : $hint }}
  2. @endforeach