praakreditasi/resources/views/pitstop/monitoring_pdf_external.blade.php
2026-05-07 19:26:20 +07:00

107 lines
3.5 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 Karyawan Luar' }}</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; }
.section { margin-top: 14px; }
.section-head { padding: 8px 10px; border: 1px solid #e5e7eb; background: #f9fafb; }
.section-title { font-size: 12px; font-weight: 700; margin: 0; }
.section-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; }
.muted { color: #6b7280; }
</style>
</head>
<body>
<div>
<div class="h1">{{ $title ?? 'Monitoring Karyawan Luar' }}</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>Tipe</th>
<th class="text-right" style="width: 130px">Selesai / Total</th>
</tr>
</thead>
<tbody>
@forelse ($types ?? [] as $i => $t)
<tr>
<td class="text-right">{{ $i + 1 }}</td>
<td>
<div style="font-weight: 700;">{{ $t->tipe }}</div>
</td>
<td class="text-right">{{ number_format((int) $t->pegawai_selesai) }}/{{ number_format((int) $t->total_pegawai) }}</td>
</tr>
@empty
<tr>
<td colspan="3" class="muted">Tidak ada data.</td>
</tr>
@endforelse
</tbody>
</table>
@else
@forelse ($types ?? [] as $t)
<div class="section">
<div class="section-head">
<div class="section-title">{{ $t->tipe }}</div>
<div class="section-meta">
Total Karyawan: <b>{{ number_format((int) $t->total_pegawai) }}</b>
&nbsp;|&nbsp; Karyawan Selesai: <b>{{ number_format((int) $t->pegawai_selesai) }}</b>
</div>
</div>
<table class="table">
<thead>
<tr>
<th style="width: 28px">No</th>
<th style="width: 230px">Nama</th>
<th style="width: 140px">NIK</th>
<th class="text-right" style="width: 120px">Lulus / Total PitStop</th>
<th>PitStop Belum Selesai</th>
</tr>
</thead>
<tbody>
@forelse ($t->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->nik }}</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="5" class="muted">Tidak ada data karyawan.</td>
</tr>
@endforelse
</tbody>
</table>
</div>
@empty
<div class="muted" style="margin-top: 14px;">Tidak ada data.</div>
@endforelse
@endif
</body>
</html>