@extends('layouts.app') @section('title', 'Daftar Permohonan') @section('content')
Permohonan Pembiayaan
Dana Bergulir Agroforestry Perorangan
@role('petugas_lapangan') Buat Permohonan Baru @endrole
@if(session('success'))
{{ session('success') }}
@endif {{-- GROUPED VIEW (untuk verifikator) --}} @if($isGrouped ?? false) {{-- Filter Bar --}}
{{-- Status --}} {{-- Bulan Ronde --}} {{-- PL --}} {{-- Kabupaten --}} {{-- Search --}}
{{-- Reset --}} @if(($filterStatus ?? '') || ($filterRonde ?? '') || ($filterPl ?? '') || ($filterKabupaten ?? '') || ($filterSearch ?? '')) Reset @endif
{{-- Kelompok Cards --}} @if(empty($kelompokList))
Tidak ada pengajuan kelompok yang perlu ditindaklanjuti
@else
@foreach($kelompokList as $item) @php $pk = $item['pk']; $badge = $item['badge']; $pct = $item['total'] > 0 ? round($item['fa_selesai'] / $item['total'] * 100) : 0; $pctDa = $item['total'] > 0 ? round($item['da_selesai'] / $item['total'] * 100) : 0; $kabupaten = $pk->kelompok?->kabupaten ?? ''; @endphp
{{ $pk->kelompok?->nama ?? '—' }}
{{ $badge['label'] }}
Ronde {{ $item['ronde'] }} @if($item['pl_name']) · PL: {{ $item['pl_name'] }} @endif @if($kabupaten) · {{ $kabupaten }} @endif · {{ $item['total'] }} anggota mengajukan
Rp {{ number_format($item['total_plafond'], 0, ',', '.') }} total plafond diajukan
FA: {{ $item['fa_selesai'] }}/{{ $item['total'] }} selesai
DA: {{ $item['da_selesai'] }}/{{ $item['total'] }} selesai
Buka
{{ $pk->created_at->diffForHumans() }}
@endforeach
@endif @else {{-- FLAT LIST VIEW (untuk field officer) --}} {{-- Desktop Table --}}
@forelse($applications as $app) @empty @endforelse
# Nama Pemohon Paket Petugas Tgl Diajukan Status
{{ $applications->firstItem() + $loop->index }}
{{ $app->applicant_name }}
{{ substr($app->id, 0, 8) }}
{{ $app->paket_label }} {{ $app->submittedBy?->name ?? '-' }} {{ $app->created_at->format('d/m/Y') }} {!! $app->status_badge !!}
Belum ada permohonan.
@if($applications->hasPages()) @endif
{{-- Mobile Card List --}}
@forelse($applications as $app)
{{ $app->applicant_name }}
{{ $app->paket_label }}
{{ $app->created_at->format('d/m/Y') }}
{!! $app->status_badge !!}
{{ substr($app->id, 0, 8) }}
@empty
Belum ada permohonan.
@endforelse {{ $applications->links() }}
@endif
@endsection