@extends('adminlte::page') @section('title', 'Today\'s Bail Check-ins') @section('content_header')

Today's Bail Check-ins

@stop @section('content')

Filter Check-ins

Reset

Suspects Due to Check-in Today

@forelse($suspectsDueToday as $suspect) @php $bailApplication = $suspect->bailApplications->first(); $condition = App\Models\BailCondition::where('bail_application_id', $bailApplication->id) ->where('condition_type', 'reporting') ->where('requires_reporting', true) ->first(); // Check if there's already a check-in recorded for today $todayCheckin = null; foreach($scheduled as $checkin) { if ($checkin->suspect_id == $suspect->id) { $todayCheckin = $checkin; break; } } foreach($present as $checkin) { if ($checkin->suspect_id == $suspect->id) { $todayCheckin = $checkin; break; } } foreach($missed as $checkin) { if ($checkin->suspect_id == $suspect->id) { $todayCheckin = $checkin; break; } } foreach($excused as $checkin) { if ($checkin->suspect_id == $suspect->id) { $todayCheckin = $checkin; break; } } @endphp @empty @endforelse
Suspect ID Number Case Reference Reporting Schedule Status Actions
{{ $suspect->full_name }} {{ $suspect->identification_number }} @if($bailApplication->case) {{ $bailApplication->case->case_number }} @else N/A @endif @if($condition) {{ $condition->reporting_schedule_text }}
Time window: {{ $condition->reporting_time_start }} - {{ $condition->reporting_time_end }} @else N/A @endif
@if($todayCheckin) @if($todayCheckin->status == 'present') Present @elseif($todayCheckin->status == 'missed') Missed @elseif($todayCheckin->status == 'excused') Excused @else Scheduled @endif @else Pending @endif @if($todayCheckin) Update @else Record Check-in @endif
No suspects due to check in today.

{{ $scheduled->count() }}

Scheduled

{{ $present->count() }}

Present

{{ $missed->count() }}

Missed

{{ $excused->count() }}

Excused

Present

@forelse($present as $checkin) @empty @endforelse
Suspect Check-in Time Actions
{{ $checkin->suspect->full_name }} {{ $checkin->checkin_time->format('h:i A') }}
No present check-ins today.

Missed

@forelse($missed as $checkin) @empty @endforelse
Suspect Scheduled Time Actions
{{ $checkin->suspect->full_name }} {{ $checkin->scheduled_time ? $checkin->scheduled_time->format('h:i A') : 'N/A' }}
No missed check-ins today.
@endsection @section('js') @stop