110 lines
3.8 KiB
PHP
110 lines
3.8 KiB
PHP
<!DOCTYPE html>
|
|
<html lang="id">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
<title>{{ $title ?? 'Monitoring Pra Akreditasi' }}</title>
|
|
<style>
|
|
/* * { font-family: DejaVu Sans, sans-serif; } */
|
|
body { font-size: 10px; color: #111827; }
|
|
.h1 { font-size: 16px; font-weight: 700; margin: 0; }
|
|
.meta { margin-top: 4px; color: #6b7280; font-size: 10px; }
|
|
/* Jangan paksa 1 unit utuh di 1 halaman (bisa bikin halaman 1 kosong) */
|
|
.unit { margin-top: 14px; }
|
|
.unit-head { padding: 8px 10px; border: 1px solid #e5e7eb; background: #f9fafb; }
|
|
.unit-title { font-size: 12px; font-weight: 700; margin: 0; }
|
|
.unit-meta { margin-top: 3px; color: #6b7280; font-size: 10px; }
|
|
.table { width: 100%; border-collapse: collapse; margin-top: 8px; }
|
|
.table th, .table td { border: 1px solid #e5e7eb; padding: 6px; vertical-align: top; }
|
|
.table th { background: #f9fafb; text-align: left; font-weight: 700; }
|
|
.text-right { text-align: right; }
|
|
.badge { display: inline-block; padding: 2px 6px; border-radius: 10px; font-size: 10px; background: #eef2ff; color: #3730a3; }
|
|
.badge-ok { background: #dcfce7; color: #166534; }
|
|
.badge-warn { background: #fff7ed; color: #9a3412; }
|
|
.muted { color: #6b7280; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div>
|
|
<div class="h1">{{ $title ?? 'Monitoring Pra Akreditasi' }}</div>
|
|
<div class="meta">
|
|
Dicetak: {{ optional($generatedAt)->format('Y-m-d H:i') }}
|
|
</div>
|
|
<div class="meta">
|
|
Total PitStop Aktif: {{ (int) ($totalSteps ?? 0) }}
|
|
</div>
|
|
</div>
|
|
|
|
@if (($isSummaryOnly ?? false) === true)
|
|
<table class="table" style="margin-top: 14px;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 28px">No</th>
|
|
<th>Unit</th>
|
|
<th class="text-right" style="width: 110px">Karyawan Selesai / Total Karyawan</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($units ?? [] as $i => $u)
|
|
<tr>
|
|
<td class="text-right">{{ $i + 1 }}</td>
|
|
<td>
|
|
<div style="font-weight: 700;">{{ $u->unit_name }}</div>
|
|
</td>
|
|
<td class="text-right">{{ number_format((int) $u->pegawai_selesai) }}/{{ number_format((int) $u->total_pegawai) }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="5" class="muted">Tidak ada data.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
@else
|
|
@forelse ($units ?? [] as $u)
|
|
<div class="unit">
|
|
<div class="unit-head">
|
|
<div class="unit-title">{{ $u->unit_name }}</div>
|
|
<div class="unit-meta">
|
|
Total Karyawan: <b>{{ number_format((int) $u->total_pegawai) }}</b>
|
|
| Karyawan Selesai: <b>{{ number_format((int) $u->pegawai_selesai) }}</b>
|
|
</div>
|
|
</div>
|
|
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 28px">No</th>
|
|
<th style="width: 210px">Nama</th>
|
|
<th style="width: 120px">NIP</th>
|
|
<th class="text-right" style="width: 120px">Lulus / Total PitStop</th>
|
|
<th>PitStop Belum Selesai</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@forelse ($u->pegawai ?? [] as $i => $p)
|
|
@php
|
|
$selesai = ((int) ($p->total_steps ?? 0)) > 0 && ((int) ($p->lulus_steps ?? 0)) >= ((int) ($p->total_steps ?? 0));
|
|
@endphp
|
|
<tr>
|
|
<td class="text-right">{{ $i + 1 }}</td>
|
|
<td>{{ $p->nama }}</td>
|
|
<td>{{ $p->nip_pns }}</td>
|
|
<td class="text-right">{{ number_format((int) $p->lulus_steps) }}/{{ number_format((int) $p->total_steps) }}</td>
|
|
<td>{{ $selesai ? '-' : ($p->belum_selesai_steps !== '' ? $p->belum_selesai_steps : '-') }}</td>
|
|
</tr>
|
|
@empty
|
|
<tr>
|
|
<td colspan="7" class="muted">Tidak ada data pegawai.</td>
|
|
</tr>
|
|
@endforelse
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@empty
|
|
<div class="muted" style="margin-top: 14px;">Tidak ada data.</div>
|
|
@endforelse
|
|
@endif
|
|
</body>
|
|
</html>
|