@extends('layouts.admin') @section('title', 'Interns') @section('heading', 'Intern Medical Officers') @section('subheading', 'All interns with their first and second six-month placements.') @section('content')
@include('admin.partials.toolbar', ['placeholder' => 'Search by name, email or SLMC reg. no…', 'noun' => 'interns', 'filters' => [ 'filter' => ['' => 'All interns', 'allocated' => 'Allocated', 'unallocated' => 'Awaiting allocation'], 'status' => ['' => 'All statuses', 'active' => 'Active', 'inactive' => 'Inactive'], ]])
@forelse($items as $i) @php $p1 = $i->allocations->firstWhere('period', 1); $p2 = $i->allocations->firstWhere('period', 2); @endphp @empty @include('admin.partials.empty', ['cols' => 5, 'message' => 'No interns found', 'icon' => 'ri-user-heart-line']) @endforelse
Intern
@include('admin.partials.person', ['person' => $i, 'tone' => 'bg-warm-gradient text-white']) {{-- Phone: placement summary under the name --}}
@if($p1)

P1{{ $p1->hospital->name }}

@if($p2)

P2{{ $p2->hospital->name }}

@endif @else Awaiting allocation @endif
@include('admin.partials.pagination', ['items' => $items])
@endsection