@extends('layouts.app') @section('content')
Back to Reception
{{ $admission->prisoner->name }} — {{ $admission->prison_number }}
@if (session('success'))
{{ session('success') }}
@endif @if ($errors->any())
    @foreach ($errors->all() as $e)
  • {{ $e }}
  • @endforeach
@endif
@csrf @switch($currentStepKey) @case('reception_info') @case('sentence_details') @php $ri = $admission->receptionInfo; @endphp
Reception Information
@if ($admission->prisonerCategory && $admission->prisonerCategory->name === 'Remand')
@endif @if ($currentStepKey === 'sentence_details' || ($admission->prisonerCategory && $admission->prisonerCategory->status_group === 'Convicted'))
@endif
@break @case('warrant_information') @php $w = $admission->warrant; $isConvicted = $admission->prisonerCategory && $admission->prisonerCategory->status_group === 'Convicted'; // Auto-calculated suggestion only — officer can always // override. LPD = start + full sentence. EPD assumes the // standard 1/3 remission for good conduct; adjust manually // if your institution's remission policy differs. $suggestedEpd = $suggestedLpd = null; if ($isConvicted && $admission->reception) { $y = (int) ($admission->reception->sentence_years ?? 0); $m = (int) ($admission->reception->sentence_months ?? 0); $d = (int) ($admission->reception->sentence_days ?? 0); if ($y || $m || $d) { $start = \Carbon\Carbon::parse( $admission->receptionInfo->sentence_start_date ?? $admission->admission_date ?? now() ); $lpd = $start->copy()->addYears($y)->addMonths($m)->addDays($d); $remissionDays = (int) floor($start->diffInDays($lpd) / 3); $suggestedLpd = $lpd->toDateString(); $suggestedEpd = $lpd->copy()->subDays($remissionDays)->toDateString(); } } @endphp
Warrant Information
@if ($admission->reception && $admission->reception->has_pending_case)
This prisoner has another pending case: {{ $admission->reception->pending_case_court }}, Case No. {{ $admission->reception->pending_case_number }}, next appearance {{ optional($admission->reception->pending_case_next_appearance_date)->format('d M Y') ?? '-' }}.
@endif
@if ($isConvicted)
@if ($suggestedEpd && !$w?->epd)
EPD/LPD auto-calculated from the sentence recorded at Gate Entry (LPD = full sentence, EPD assumes 1/3 remission for good conduct). Edit either date if your institution's policy differs or this case has special conditions.
@endif @else
EPD/LPD and conviction date don't apply — this prisoner is Unconvicted. Their next court appearance is captured on the Reception Information step.
@endif
@break @case('children') @php $existingChildren = $admission->children; @endphp
Accompanying Children (CAM10)
@if ($admission->reception && $admission->reception->has_accompanying_child)
Gate Entry recorded this prisoner as having an accompanying child — please add their details below.
@else

Only applicable if a child under four years is accompanying the prisoner. Leave empty if not applicable.

@endif @forelse ($existingChildren as $i => $child) @empty @endforelse
Child NameDate of BirthGenderNotes
@break @case('civil_debtor') @php $cd = $admission->civilDebtorDetail; @endphp
Civil Debtor Details
@break @case('property') @case('valuables') @php $type = $currentStepKey === 'valuables' ? 'valuable' : 'property'; @endphp
{{ $currentStepKey === 'valuables' ? 'Valuable Property Register' : 'Property Register' }}
@if ($type === 'property')@endif @php $existing = $admission->belongings->where('type', $type); @endphp @forelse ($existing as $i => $item) @if ($type === 'property') @endif @empty @endforelse
Property TypeDescriptionQtyEst. ValueNotes
@break @case('cash_book') @php $c = $admission->cashRecord; @endphp
Cash Book
@break @case('biometrics')
Passport Photo
@if ($admission->prisoner->photo) @else

No photo yet — click "Start Camera"

@endif

Works in any modern browser (Chrome, Edge, Firefox, Safari) via your device's built-in or connected USB webcam. If the browser asks for camera permission, click Allow.
Note: browsers require HTTPS (or localhost) to access the camera — if "Start Camera" doesn't prompt for permission on your live server, check that it's served over HTTPS.

Fingerprint

@if ($admission->prisoner->fingerprint_hash)

Fingerprint already on file for this prisoner.

@else

Not yet captured.

@endif

Requires the fingerprint scanner's local capture service to be running on this machine (see FINGERPRINT_AGENT_URL below). If no scanner is connected, leave this and continue — you can capture it later; the fingerprint is saved against the prisoner permanently and reused for any future verification, including cash transactions.

@break @case('next_of_kin') @php $existingKin = $admission->prisoner->nextOfKin; @endphp
Next of Kin
@forelse ($existingKin as $i => $kin) @empty @endforelse
NameID NumberPhoneRelationshipPrimary?
is_primary ? 'checked' : '' }}>

Select the radio button next to the primary contact. Multiple next of kin can be added.

@break @case('block_assignment') @php $blocks = \App\Models\BranchBlock::where('branch_id', $admission->branch_id) ->where('status', 1) ->orderBy('block_name') ->get() ->map(function ($b) { $b->occupancy = \App\Models\Admission::where('branch_id', $b->branch_id) ->where('cell_block', $b->block_name) ->whereNull('release_date') ->count(); return $b; }); @endphp
Block Assignment
@if ($blocks->isEmpty())
No blocks configured for this prison yet. Add them under Setup → Branches → Blocks before continuing.
@else
@foreach ($blocks as $block) @php $full = $block->capacity && $block->occupancy >= $block->capacity; @endphp
@endforeach
@endif
@break @endswitch
@endsection