@extends('layouts.admin') @section('title', 'Dashboard') @section('heading', 'Administration Overview') @use('App\Models\InternEvaluation', 'E') @use('App\Models\InternHospitalAllocation', 'Allocation') @section('content') @php // Workflow stages for the cycle chart — palette validated (CVD + contrast) with the dataviz validator. $stages = [ 'with_slmc' => ['Received by SLMC', '#059669', 'ri-lock-2-line'], 'director' => ['With director', '#4f46e5', 'ri-hospital-line'], 'returned' => ['Returned', '#ea580c', 'ri-arrow-go-back-line'], 'consultant' => ['With consultant', '#2563eb', 'ri-stethoscope-line'], 'draft' => ['Draft', '#94a3b8', 'ri-draft-line'], 'not_started' => ['Not started', '#e2e8f0', 'ri-time-line'], ]; $typeChip = ['main' => 'bg-white text-slmc', 'repeat' => 'bg-orange-500 text-white']; $cycleState = ['completed' => 'bg-emerald-400', 'current' => 'bg-white', 'upcoming' => 'bg-white/20']; $scope = $batch ? $batch->name : 'All batches'; @endphp {{-- ═════════ Batch filter (parent) ═════════ --}}
{{-- ═════════ Batch summary ═════════ --}}{{ $batch->starts_on->format('j M Y') }} – {{ $batch->ends_on->format('j M Y') }}
Q{{ $c->quarter }} · P{{ $c->period }} @if($c->state() === 'current')Now@endif
{{ $c->starts_on->format('j M') }} – {{ $c->ends_on->format('j M Y') }}
All batches
Combined figures across every main and repeat batch. Choose a batch above to focus on one intake.
{{ $l }}
{{ $v }}
{{ number_format($value) }}
{{ $label }}
@if($sub){{ $sub }}
@endif{{ $scope }} · {{ number_format($internCount) }} interns, one evaluation each per cycle
Q{{ $q }}
P{{ (int) ceil($q / 2) }}
{{ round($done / $internCount * 100) }}%to SLMC
| Cycle | @foreach($stages as [$label]){{ $label }} | @endforeach
|---|---|
| Evaluation {{ $q }} | @foreach($stages as $key => $s){{ $counts[$key] }} | @endforeach
{{ $scope }}
Workflow totals
{{ $batch ? 'Hospitals with interns in this batch' : 'Top hospitals by placements' }}
| Hospital | Interns | No consultant | With director | To SLMC |
|---|---|---|---|---|
|
{{ $h->name }} {{ $h->code }}{{ $h->district ? ' · '.$h->district : '' }} |
{{ $h->interns_count }} | @if($h->no_consultant_count){{ $h->no_consultant_count }}@else0@endif | {{ $h->with_director_count }} | {{ $h->received_count }} |
{{ $a->actor_name }} · {{ strtolower($a->label()) }}
@if($a->evaluation) Q{{ $a->evaluation->quarter }} · {{ $a->evaluation->allocation?->intern?->name }} @endif