@extends('layouts.app') @section('title', 'Field Analysis') @section('content')
{{-- Progress card --}} @php $pct = $totalFaBatches > 0 ? round($selesaiFaBatches / $totalFaBatches * 100) : 0; @endphp
FA Selesai Direview {{ $selesaiFaBatches }} / {{ $totalFaBatches }} batch
{{-- Filter bar --}}
@if(request()->hasAny(['q', 'status'])) @endif
{{-- Desktop table --}}
@forelse($batches as $i => $batch) @php $pengajuan = $batch->pengajuan; $total = $pengajuan->count(); $doneCount = $pengajuan->filter(fn($p) => in_array($p->status->value, ['waiting_keputusan', 'disetujui', 'ditolak']) )->count(); $statusKey = app(\App\Http\Controllers\Penelaah\PenelaahFaController::class)->batchStatusKey($batch); [$statusLabel, $statusBadge] = match($statusKey) { 'menunggu_review' => ['Menunggu Review', 'bg-warning text-dark'], 'menunggu_keputusan' => ['Menunggu Keputusan', 'bg-info text-dark'], default => ['Selesai', 'bg-success'], }; $canAct = in_array($statusKey, ['menunggu_review', 'menunggu_keputusan']); @endphp @empty @endforelse
# Nama Kelompok Ronde Jml Debitur Review FA Status Batch
{{ $batches->firstItem() + $i }} {{ $batch->kelompok->nama ?? '-' }} {{ $batch->created_at->translatedFormat('M Y') }} {{ $total }}
{{ $doneCount }}/{{ $total }}
{{ $statusLabel }} {{ $canAct ? 'Buka' : 'Lihat' }}
{{-- Mobile card list --}}
@forelse($batches as $batch) @php $pengajuan = $batch->pengajuan; $total = $pengajuan->count(); $doneCount = $pengajuan->filter(fn($p) => in_array($p->status->value, ['waiting_keputusan', 'disetujui', 'ditolak']) )->count(); $statusKey = app(\App\Http\Controllers\Penelaah\PenelaahFaController::class)->batchStatusKey($batch); [$statusLabel, $statusBadge] = match($statusKey) { 'menunggu_review' => ['Menunggu Review', 'bg-warning text-dark'], 'menunggu_keputusan' => ['Menunggu Keputusan', 'bg-info text-dark'], default => ['Selesai', 'bg-success'], }; $canAct = in_array($statusKey, ['menunggu_review', 'menunggu_keputusan']); @endphp
{{ $batch->kelompok->nama ?? '-' }}
Ronde {{ $batch->created_at->translatedFormat('M Y') }} · {{ $total }} debitur
{{ $statusLabel }}
{{ $doneCount }}/{{ $total }} review FA
{{ $canAct ? 'Buka' : 'Lihat' }}
@empty @endforelse
{{-- Pagination --}} @if($batches->hasPages())
{{ $batches->links() }}
@endif
@endsection