MIF_E31231754/resources/views/admin/saw/pdf.blade.php

309 lines
10 KiB
PHP

<!DOCTYPE html>
<html lang="id">
<head>
<meta charset="UTF-8">
<title>Laporan Hasil SAW - {{ $periode->nama }}</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: 'DejaVu Sans', sans-serif;
font-size: 11px;
color: #1a1a1a;
padding: 20px 30px;
}
/* ===== KOP SURAT ===== */
.kop {
display: table;
width: 100%;
border-bottom: 3px double #000;
padding-bottom: 8px;
margin-bottom: 14px;
}
.kop-logo {
display: table-cell;
width: 70px;
vertical-align: middle;
text-align: center;
}
.kop-logo img {
width: 60px;
height: 60px;
}
.kop-text {
display: table-cell;
vertical-align: middle;
text-align: center;
padding: 0 10px;
}
.kop-text .instansi-atas {
font-size: 11px;
font-weight: bold;
letter-spacing: 0.3px;
}
.kop-text .instansi-nama {
font-size: 18px;
font-weight: bold;
letter-spacing: 1px;
margin: 2px 0;
}
.kop-text .instansi-alamat {
font-size: 9.5px;
color: #c0392b;
}
.kop-text .instansi-kontak {
font-size: 9.5px;
margin-top: 2px;
}
/* ===== JUDUL LAPORAN ===== */
.judul {
text-align: center;
margin-bottom: 12px;
padding-bottom: 10px;
border-bottom: 1px solid #ccc;
}
.judul h2 {
font-size: 13px;
font-weight: bold;
text-transform: uppercase;
letter-spacing: 0.5px;
}
.judul p {
font-size: 10px;
color: #555;
margin-top: 2px;
}
/* ===== INFO PERIODE ===== */
.info-periode {
margin-bottom: 14px;
width: 100%;
}
.info-periode table {
border-collapse: collapse;
}
.info-periode td {
font-size: 10.5px;
padding: 2px 0;
vertical-align: top;
}
.info-periode td.label { width: 110px; font-weight: normal; }
.info-periode td.sep { width: 14px; }
.info-periode td.val { color: #1a1a1a; }
.info-periode td.val strong { color: #1a4fc4; }
/* ===== TABEL HASIL ===== */
table.hasil {
width: 100%;
border-collapse: collapse;
margin-bottom: 0;
}
table.hasil thead tr {
background: #1a3c2e;
color: #fff;
}
table.hasil thead th {
padding: 6px 8px;
font-size: 10px;
text-align: center;
border: 1px solid #155230;
}
table.hasil tbody tr:nth-child(even) { background: #f6fbf8; }
table.hasil tbody td {
padding: 5px 8px;
font-size: 10px;
border: 1px solid #c8ddd2;
vertical-align: middle;
}
table.hasil tbody td.center { text-align: center; }
table.hasil tbody td.right { text-align: right; font-family: 'DejaVu Sans Mono', monospace; }
/* Status */
.status-penerima { color: #065f46; font-weight: bold; }
.status-cadangan { color: #92400e; font-weight: bold; }
.status-tidak { color: #991b1b; font-weight: bold; }
/* ===== FOOTER TABEL ===== */
.tabel-footer {
border: 1px solid #c8ddd2;
border-top: none;
padding: 6px 10px;
font-size: 10px;
background: #f0f7f3;
}
.tabel-footer table { width: auto; border-collapse: collapse; }
.tabel-footer td { padding: 0 12px 0 0; }
.tabel-footer .lbl { font-weight: bold; }
.tabel-footer .val { color: #1a3c2e; font-weight: bold; }
/* ===== TANDA TANGAN ===== */
.ttd-section {
margin-top: 24px;
text-align: right;
}
.ttd-section .ttd-kota {
font-size: 10.5px;
margin-bottom: 40px;
}
.ttd-section .ttd-jabatan {
font-size: 10.5px;
font-weight: bold;
}
.ttd-section .ttd-line {
display: inline-block;
margin-top: 46px;
border-top: 1px solid #333;
min-width: 180px;
font-size: 10px;
text-align: center;
padding-top: 3px;
}
/* ===== CATATAN KAKI ===== */
.catatan {
margin-top: 30px;
border-top: 1px dashed #aaa;
padding-top: 6px;
font-size: 8.5px;
color: #777;
}
</style>
</head>
<body>
{{-- ==================== KOP SURAT ==================== --}}
<div class="kop">
<div class="kop-logo">
<img src="{{ public_path('images/logo-kab.png') }}" alt="Logo">
</div>
<div class="kop-text">
<div class="instansi-atas">PEMERINTAH KABUPATEN MOJOKERTO</div>
<div class="instansi-atas">KECAMATAN PUNGGING</div>
<div class="instansi-nama">DESA PUNGGING</div>
<div class="instansi-alamat">Jalan Raya Pungging No. 27 Pungging, Mojokerto, Jawa Timur</div>
<div class="instansi-kontak">Kode Pos 61384 &nbsp;&nbsp; Telp. (0321) 532733</div>
</div>
</div>
{{-- ==================== JUDUL ==================== --}}
<div class="judul">
<h2>LAPORAN HASIL SELEKSI PENERIMA BLT DANA DESA</h2>
<p>Metode <em>Simple Additive Weighting</em> (SAW) &mdash; Sistem Pendukung Keputusan</p>
</div>
{{-- ==================== INFO PERIODE ==================== --}}
<div class="info-periode">
<table>
<tr>
<td class="label">Periode Seleksi</td>
<td class="sep">:</td>
<td class="val"><strong>{{ $periode->nama }}</strong></td>
</tr>
<tr>
<td class="label">Tanggal</td>
<td class="sep">:</td>
<td class="val">
<strong>{{ \Carbon\Carbon::parse($periode->tanggal_mulai)->isoFormat('D MMMM Y') }}</strong>
s.d.
<strong>{{ \Carbon\Carbon::parse($periode->tanggal_selesai)->isoFormat('D MMMM Y') }}</strong>
</td>
</tr>
<tr>
<td class="label">Kuota Penerima</td>
<td class="sep">:</td>
<td class="val">{{ $periode->kuota_penerima }} orang</td>
</tr>
<tr>
<td class="label">Status</td>
<td class="sep">:</td>
<td class="val">{{ ucfirst($periode->status) }}</td>
</tr>
<tr>
<td class="label">Dicetak</td>
<td class="sep">:</td>
<td class="val">{{ \Carbon\Carbon::now()->isoFormat('D MMMM Y') }}, pukul {{ \Carbon\Carbon::now()->format('H:i') }} WIB</td>
</tr>
</table>
</div>
{{-- ==================== TABEL HASIL ==================== --}}
<table class="hasil">
<thead>
<tr>
<th style="width:28px;">No</th>
<th style="width:42px;">Ranking</th>
<th>Nama Warga</th>
<th style="width:110px;">NIK</th>
<th style="width:70px;">Dusun</th>
<th style="width:30px;">RW</th>
<th style="width:70px;">Skor SAW</th>
<th style="width:60px;">Status</th>
</tr>
</thead>
<tbody>
@forelse($hasil as $i => $h)
<tr>
<td class="center">{{ $i + 1 }}</td>
<td class="center">#{{ $h->ranking }}</td>
<td><strong>{{ $h->warga->nama ?? '-' }}</strong></td>
<td class="center" style="font-size:9.5px; font-family:'DejaVu Sans Mono',monospace;">
{{ substr($h->warga->nik ?? '----------------', 0, 8) }}********
</td>
<td class="center">{{ $h->warga->wilayah->dusun ?? '-' }}</td>
<td class="center">{{ str_pad($h->warga->wilayah->rw ?? '-', 2, '0', STR_PAD_LEFT) }}</td>
<td class="right">{{ number_format($h->skor_akhir, 6) }}</td>
<td class="center">
@if($h->status == 'penerima')
<span class="status-penerima">Penerima</span>
@elseif($h->status == 'cadangan')
<span class="status-cadangan">Cadangan</span>
@else
<span class="status-tidak">Tidak</span>
@endif
</td>
</tr>
@empty
<tr>
<td colspan="8" class="center" style="padding:12px; color:#777;">Tidak ada data</td>
</tr>
@endforelse
</tbody>
</table>
{{-- ==================== FOOTER TABEL ==================== --}}
<div class="tabel-footer">
<table>
<tr>
<td><span class="lbl">Total Peserta</span></td>
<td><span class="val">{{ $hasil->count() }} orang</span></td>
<td>&nbsp;&nbsp;&nbsp;</td>
<td><span class="lbl">Penerima BLT</span></td>
<td><span class="val">{{ $hasil->where('status','penerima')->count() }} orang</span></td>
<td>&nbsp;&nbsp;&nbsp;</td>
<td><span class="lbl">Tidak Menerima</span></td>
<td><span class="val">{{ $hasil->whereIn('status',['cadangan','tidak_penerima'])->count() }} orang</span></td>
</tr>
</table>
</div>
{{-- ==================== TANDA TANGAN ==================== --}}
<div class="ttd-section">
<div class="ttd-kota">
Pungging, {{ \Carbon\Carbon::now()->isoFormat('D MMMM Y') }}<br>
<strong>Kepala Desa Pungging</strong>
</div>
<div>
<span class="ttd-line">( &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</span>
</div>
</div>
{{-- ==================== CATATAN KAKI ==================== --}}
<div class="catatan">
* NIK disamarkan (8 digit terakhir) untuk menjaga privasi data warga &nbsp;|&nbsp;
Dokumen ini digenerate otomatis oleh Sistem SPK BLT-DD.
</div>
</body>
</html>