@extends('layouts.app') @section('title', 'CI Student Assignments') @section('content')

CI Student Assignments

Assign each student to a clinical instructor per semester for their Clinical Performance Report.

@if($errors->any())
@endif {{-- ── Filters ────────────────────────────────────────────────────────── --}}
@if(request()->hasAny(['q', 'intake', 'filter'])) Clear @endif
@if($semester) {{-- ── Coverage ───────────────────────────────────────────────────────── --}}
@php $unassigned = max(0, $totalStudents - $assignedTotal); @endphp
{{ $semester->name }} coverage {{ $assignedTotal }} of {{ $totalStudents }} students assigned
{{ $unassigned }} unassigned @forelse($instructors as $ci) {{ $ci->name }}: {{ $counts->get($ci->id, 0) }} @empty No active clinical instructors exist yet. @endforelse
@if($instructors->isEmpty())
There are no active clinical instructors to assign. Manage users.
@endif
@csrf
@forelse($students as $student) @php $assigned = $student->ciAssignment->first(); @endphp @empty @endforelse
Student Intake Assigned clinical instructor Status
@if($student->studentProfile?->photo_path) @else {{ strtoupper(mb_substr($student->name, 0, 1)) }} @endif
{{ $student->name }}
{{ $student->studentProfile?->student_id ?: '—' }}
{{ $student->studentProfile?->intake ?: '—' }} @if($assigned) @else — @endif
No students match your filters.
@if($students->isNotEmpty()) @endif
@endif @endsection