@extends('layouts.admin') @section('title', 'Batches') @section('heading', $batch->name) @use('App\Models\InternEvaluation', 'E') @use('App\Models\InternHospitalAllocation', 'Allocation') @section('content') @php $statusChip = [ 'upcoming' => ['Upcoming', 'bg-blue-400/20 text-blue-50 ring-blue-200/40'], 'in_progress' => ['In progress', 'bg-emerald-400/20 text-emerald-50 ring-emerald-200/40'], 'completed' => ['Completed', 'bg-white/10 text-white ring-white/20'], 'inactive' => ['Inactive', 'bg-white/10 text-blue-100 ring-white/20'], ][$batch->status()]; $cycleChip = ['current' => 'bg-blue-600 text-white', 'completed' => 'bg-emerald-100 text-emerald-700', 'upcoming' => 'bg-slate-100 text-slate-600']; @endphp All batches {{-- ═════════ Header ═════════ --}}
$batch->type === 'main', 'bg-orange-500 text-white' => $batch->type === 'repeat'])>{{ $batch->typeLabel() }} batch {{ $statusChip[0] }} {{ $batch->code }}

{{ $batch->name }}

@if($batch->description)

{{ $batch->description }}

@endif
Edit @unless($batch->allocations()->exists())
@csrf @method('DELETE')
@endunless
@foreach([ ['Batch year', $batch->year], ['Starts', $batch->starts_on->format('j M Y')], ['Completes', $batch->ends_on->format('j M Y')], ['Interns', number_format($batch->interns_count)], ] as [$label, $value])
{{ $label }}
{{ $value }}
@endforeach
Internship year progress{{ $batch->progressPercent() }}%
{{-- ═════════ Evaluation cycles ═════════ --}}

Evaluation cycles

Generated automatically from the start date · one every 3 months

Auto-generated
@foreach($batch->cycles->groupBy('period') as $period => $cycles)
P{{ $period }}

{{ Allocation::PERIOD_LABELS[$period] }}

{{ $cycles->first()->starts_on->format('j M Y') }} – {{ $cycles->last()->ends_on->format('j M Y') }}

    @foreach($cycles as $c) @php $counts = ($byQuarter[$c->quarter] ?? collect())->pluck('total', 'status'); $total = $counts->sum(); $locked = (int) ($counts[E::LOCKED] ?? 0); @endphp
  • $c->state() === 'completed', 'bg-blue-600 text-white ring-4 ring-blue-100' => $c->state() === 'current', 'bg-slate-100 text-slate-500' => $c->state() === 'upcoming'])>Q{{ $c->quarter }}

    Evaluation {{ $c->quarter }}

    {{ $c->state() }}

    {{ $c->starts_on->format('j M Y') }} – {{ $c->ends_on->format('j M Y') }}

    {{ $total }} started · {{ $locked }} received by SLMC {{ $batch->interns_count ? round($locked / max(1, $batch->interns_count) * 100) : 0 }}%
    @if($batch->interns_count) @endif
  • @endforeach
@endforeach

{{ number_format($batch->placements_count) }} placements in this batch

First and second six-month hospital allocations.

View allocations
@endsection