Files
D1041231009-WebGIS-PovertyMap/resources/views/exports/laporan-miskin.blade.php
T
GuavaPopper 1fcad7d9b2 feat: Plan 5 — Ekspor PDF + Ekspor per Radius + Cetak Laporan
- Add ExportController: allMiskinPDF (all data) + radiusMiskinPDF
  (server-side Haversine filtering per ibadah radius)
- Add two table-based PDF Blade views (dompdf-compatible, no flexbox/grid)
- Add export routes (/export/pdf, /export/pdf/radius/{id}/{radius})
  with numeric route constraints
- Add "Ekspor PDF" button to data tabular view
- Add CSV + PDF radius export buttons to map analysis panel;
  exportRadiusCSV() reuses existing isInside(); PDF href synced on
  ibadah click and radius slider change
- 5 new tests: access control, PDF content-type, 404 + param validation
- Mark K-04 and Section 5 (Cetak & Ekspor) complete in missing_features.md
- Update README with export features

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-03 20:44:10 +07:00

63 lines
2.7 KiB
PHP

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Laporan Keluarga Miskin</title>
<style>
body { font-family: DejaVu Sans, sans-serif; font-size: 9px; color: #1f2937; margin: 20px; }
h1 { font-size: 15px; text-align: center; margin: 0 0 2px 0; }
.subtitle { text-align: center; font-size: 9px; color: #6b7280; margin: 0 0 12px 0; }
.summary { background: #f3f4f6; padding: 6px 10px; margin-bottom: 10px; font-size: 9px; }
table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
th { background: #1e40af; color: #fff; padding: 5px 6px; text-align: left; font-size: 8px; text-transform: uppercase; }
td { padding: 4px 6px; border-bottom: 1px solid #e5e7eb; font-size: 8px; vertical-align: top; }
tr:nth-child(even) td { background: #f9fafb; }
.footer { font-size: 7px; color: #9ca3af; text-align: right; border-top: 1px solid #e5e7eb; padding-top: 4px; }
</style>
</head>
<body>
<h1>Laporan Data Keluarga Miskin</h1>
<p class="subtitle">WebGIS Pemetaan Kemiskinan &mdash; Dicetak: {{ now()->format('d/m/Y H:i') }} WIB</p>
<div class="summary">
<strong>Total Keluarga:</strong> {{ $miskin->count() }} &nbsp;&nbsp;
<strong>Total KK:</strong> {{ $totalKK }} &nbsp;&nbsp;
<strong>Total Jiwa:</strong> {{ $totalJiwa }} &nbsp;&nbsp;
<strong>Total Rumah Ibadah:</strong> {{ $ibadahCount }}
</div>
<table>
<thead>
<tr>
<th style="width:20px">#</th>
<th style="width:60px">ID Rumah</th>
<th style="width:80px">Nama KK</th>
<th>Alamat</th>
<th style="width:20px">KK</th>
<th style="width:20px">Jiwa</th>
<th style="width:60px">Pekerjaan</th>
<th style="width:50px">Kondisi</th>
</tr>
</thead>
<tbody>
@forelse($miskin as $i => $m)
<tr>
<td>{{ $i + 1 }}</td>
<td>{{ $m->id_rumah }}</td>
<td>{{ $m->nama_kk ?: '-' }}</td>
<td>{{ Str::limit($m->alamat, 45) }}</td>
<td style="text-align:center">{{ $m->jumlah_kk }}</td>
<td style="text-align:center">{{ $m->jumlah_orang }}</td>
<td>{{ $m->pekerjaan ?: '-' }}</td>
<td>{{ str_replace('_', ' ', $m->kondisi_rumah ?: '-') }}</td>
</tr>
@empty
<tr><td colspan="8" style="text-align:center;padding:12px;">Tidak ada data</td></tr>
@endforelse
</tbody>
</table>
<p class="footer">Dokumen ini dibuat otomatis oleh sistem WebGIS Pemetaan Kemiskinan.</p>
</body>
</html>