@extends('layouts.app') @section('content')
Automated Disbursement Schedule
Loans are automatically disbursed at 9:00 AM, 12:00 PM, and 3:00 PM daily
9:00 AM
Morning Batch
{{ $morningStats['pending'] ?? 0 }} Pending
{{ $morningStats['processed'] ?? 0 }} Processed
@if($morningStats['last_run'])
Last run: {{ \Carbon\Carbon::parse($morningStats['last_run'])->format('d/m/Y') }}
@endif
@if($morningStats['status'] === 'completed') Completed @elseif($morningStats['status'] === 'running') Running @else Scheduled @endif
12:00 PM
Afternoon Batch
{{ $afternoonStats['pending'] ?? 0 }} Pending
{{ $afternoonStats['processed'] ?? 0 }} Processed
@if($afternoonStats['last_run'])
Last run: {{ \Carbon\Carbon::parse($afternoonStats['last_run'])->format('d/m/Y') }}
@endif
@if($afternoonStats['status'] === 'completed') Completed @elseif($afternoonStats['status'] === 'running') Running @else Scheduled @endif
3:00 PM
Evening Batch
{{ $eveningStats['pending'] ?? 0 }} Pending
{{ $eveningStats['processed'] ?? 0 }} Processed
@if($eveningStats['last_run'])
Last run: {{ \Carbon\Carbon::parse($eveningStats['last_run'])->format('d/m/Y') }}
@endif
@if($eveningStats['status'] === 'completed') Completed @elseif($eveningStats['status'] === 'running') Running @else Scheduled @endif
Current Queue Status
{{ $queueStats['total_pending'] ?? 0 }}
Total in Queue
{{ $queueStats['next_batch'] ?? 0 }}
Next Batch
{{ $queueStats['processed_today'] ?? 0 }}
Processed Today
TZS {{ number_format($queueStats['total_amount'] ?? 0, 2) }}
Queue Value
Recent Batch History
@forelse($batchHistory as $batch) @empty @endforelse
Date Time Slot Processed Success Failed Amount (TZS) Batch IDs Status
{{ \Carbon\Carbon::parse($batch->batch_date)->format('d/m/Y') }} @if($batch->time_slot === 'morning') 9:00 AM @elseif($batch->time_slot === 'afternoon') 12:00 PM @else 3:00 PM @endif {{ $batch->total_processed }} {{ $batch->successful }} {{ $batch->failed }} {{ number_format($batch->total_amount ?? 0, 2) }} @if($batch->batch_ids) {{ implode(', ', array_slice(json_decode($batch->batch_ids, true) ?? [], 0, 2)) }}... @else - @endif @if($batch->failed > 0) Partial @elseif($batch->successful > 0) Success @else No Loans @endif
No batch history available
@endsection @push('styles') @endpush @push('scripts') @endpush