@php $student=isset($query['student'])?$records->studentDetail([(int)$query['student'],$sid]):null; if($student): @endphp ← All students

{!! e($student['name']) !!}

{!! e($student['university_id']) !!} · {!! e($student['email']) !!}

{!! \App\Support\Ui::badge($student['membership']) !!}
@if(\App\Support\Ui::admin()&&$student['membership']==='missing_review')

Finance membership review

The latest Finance snapshot omitted this student. No previous fulfillment was deleted.

{!! \App\Support\Ui::post_form('membership',$sid,''.\App\Support\Ui::input('note','Review reason'),'Record review') !!}
@endif

Enrolled courses and sections

{!! \App\Support\Ui::table(['Course','Section','Registration'],array_map(fn($r)=>[e($r['course_code']),e($r['section']),\App\Support\Ui::badge($r['active']?'enrolled':'dropped')],$records->studentEnrollments([$student['id']]))) !!}

Book fulfillment history

@php $body=[]; foreach($records->studentDemands([$student['id']]) as $x){$d=\App\Services\FulfillmentService::demand_row((int)$x['id']);$body[]=[e($d['course_code'].' / '.$d['section']),e($d['book_title']).'ISBN '.e($d['target_isbn']).'',e($d['publisher']),\App\Support\Ui::badge($d['active']?'active':'on_hold'),$d['provider_confirmed_at']?\App\Support\Ui::badge('provider_confirmed').''.e($d['provider_confirmed_at']).'':'—',\App\Support\Ui::badge($d['activation'])];} echo \App\Support\Ui::table(['Course / section','Book','Publisher','Demand','Kortext report','Student activation'],$body); @endphp

Code transactions

@php $body=[];foreach($records->studentAllocations([$student['id']]) as $r)$body[]=[e('#'.$r['id']),e($r['course_code'].' / '.$r['section']),e($r['isbn']),e($r['generation']),\App\Support\Ui::badge($r['state']),e($r['allocated_at']),e($r['sent_at']??'Not sent')];echo \App\Support\Ui::table(['Allocation','Course','ISBN','Version','Code status','Allocated (UTC)','Email sent (UTC)'],$body); @endphp

Kortext delivery and refund history

{!! \App\Support\Ui::table(['Book request','Delivery version','Reported delivery (UTC)','Confirmed refund (UTC)'],array_map(fn($r)=>[e('#'.$r['demand_id']),e($r['generation']),e($r['reported_at']),e($r['refunded_at']??'Not confirmed')],$records->studentDeliveries([$student['id']]))) !!}

Notifications

{!! \App\Support\Ui::table(['To','Subject','Status','Created (UTC)','Sent (UTC)'],array_map(fn($r)=>[e($r['recipient']),e($r['subject']),\App\Support\Ui::badge($r['state']),e($r['created_at']),e($r['sent_at']??'—')],$records->studentNotifications([$student['id']]))) !!}

Cases and referrals

@php $cases=$records->studentCases([$sid,$student['id'],$student['id']]);echo \App\Support\Ui::table(['Case','Type','Status','Reason','Latest decision'],array_map(fn($r)=>['#'.$r['id'].'',e(str_replace('_',' ',$r['type'])),\App\Support\Ui::badge($r['state']),e($r['reason']),e($r['decision']??'—')],$cases)); @endphp

Student audit history

@php $entities=['student:'.$student['id']];foreach($records->studentDemandIds([$student['id']]) as $r)$entities[]='demand:'.$r['id'];foreach($records->studentAllocationIds([$student['id']]) as $r)$entities[]='allocation:'.$r['id'];foreach($records->studentNotificationIds([$student['id']]) as $r)$entities[]='notification:'.$r['id'];foreach($cases as $r)$entities[]='case:'.$r['id']; echo \App\Support\Ui::table(['Time (UTC)','Actor','Action','Details'],array_map(fn($r)=>[e($r['created_at']),e($r['actor']),e($r['action']),e($r['detail'])],$records->studentAudit(array_merge([$sid],$entities))));@endphp
@php else: $q=trim($query['q']??''); $filter=$query['membership']??''; @endphp
{!! \App\Support\Ui::input('q','Search ID, name or email','search',$q,false) !!}
@php echo \App\Support\Ui::table(['University ID','Student','University email','Scholarship'],array_map(fn($r)=>[''.e($r['university_id']).'',e($r['name']),e($r['email']),\App\Support\Ui::badge($r['membership'])],$records->students($sid,$q,$filter))); @endphp
@endif @if(isset($records->paginators['students']))@include('components.pagination',['paginator'=>$records->paginators['students']])@endif