@extends('layouts.app') @section('title', ($pengajuanKelompok->kelompok->nama ?? 'Batch') . ' — Field Analysis') @section('content')
{{-- Progress + Submit card --}} @php $total = $batchPengajuan->count(); $pct = $total > 0 ? round($reviewedCount / $total * 100) : 0; $belumCount = $total - $reviewedCount; @endphp
Review FA Penelaah {{ $reviewedCount }} / {{ $total }} debitur selesai
@if($batchSelesai)
@csrf
@else @endif
@if(!$batchSelesai && $belumCount > 0)
{{ $belumCount }} debitur belum selesai direview. Tombol Submit Batch aktif setelah semua debitur selesai.
@endif
{{-- Desktop table --}}
@forelse($batchPengajuan as $i => $p) @php $canReview = in_array($p->status->value, ['fa', 'waiting_review_fa']); [$faLabel, $faBadge] = match(true) { in_array($p->status->value, ['waiting_keputusan', 'disetujui', 'ditolak']) => ['Selesai', 'bg-success'], $p->status->value === 'waiting_review_fa' => ['Sedang Direview', 'bg-warning text-dark'], default => ['Belum', 'bg-secondary'], }; @endphp @empty @endforelse
# Nama Debitur NIK Status FA Penelaah
{{ $i + 1 }} {{ $p->debitur->nama ?? '-' }} {{ $p->debitur->nik ?? '-' }} {{ $faLabel }} {{ $canReview ? 'Review FA' : 'Lihat' }}
{{-- Mobile card list --}}
@forelse($batchPengajuan as $p) @php $canReview = in_array($p->status->value, ['fa', 'waiting_review_fa']); [$faLabel, $faBadge] = match(true) { in_array($p->status->value, ['waiting_keputusan', 'disetujui', 'ditolak']) => ['Selesai', 'bg-success'], $p->status->value === 'waiting_review_fa' => ['Sedang Direview', 'bg-warning text-dark'], default => ['Belum', 'bg-secondary'], }; @endphp
{{ $p->debitur->nama ?? '-' }}
NIK {{ $p->debitur->nik ?? '-' }}
{{ $faLabel }}
@empty @endforelse
@endsection