Files
lms-v2/resources/views/pages/admin/sops/pdf.blade.php
T

75 lines
3.2 KiB
PHP
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<title>Master Dokumen - Tunggal Pharma</title>
<style>
body { font-family: 'Helvetica', 'Arial', sans-serif; font-size: 11px; color: #333; }
.header-title { text-align: center; font-size: 18px; font-weight: bold; margin-bottom: 5px; text-transform: uppercase; color: #1e3a8a; }
.divider { border-bottom: 2px solid #1e3a8a; margin-bottom: 15px; }
.info-table { width: 100%; margin-bottom: 15px; border: none; font-size: 11px; }
.info-table td { border: none; padding: 4px 0; }
table.data-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
table.data-table th, table.data-table td { border: 1px solid #94a3b8; padding: 6px 8px; text-align: left; vertical-align: top; }
table.data-table th { background-color: #f1f5f9; font-weight: bold; text-transform: uppercase; font-size: 10px; color: #475569; }
table.data-table tr:nth-child(even) { background-color: #f8fafc; }
.text-center { text-align: center; }
.badge { background: #e2e8f0; padding: 2px 5px; border-radius: 3px; font-size: 10px; font-weight: bold; }
</style>
</head>
<body>
<div class="header-title">Data Master Dokumen - Tunggal Pharma</div>
<div class="divider"></div>
<table class="info-table">
<tr>
<td width="15%"><b>Diunduh Oleh</b></td>
<td width="35%">: {{ $downloader }}</td>
<td width="15%"><b>Total Record</b></td>
<td width="35%">: <span style="background: #1e3a8a; color: white; padding: 2px 6px; border-radius: 3px;">{{ $totalRecords }} Dokumen</span></td>
</tr>
<tr>
<td><b>Waktu Unduh</b></td>
<td>: {{ $downloadTime }} WIB</td>
<td></td>
<td></td>
</tr>
</table>
<table class="data-table">
<thead>
<tr>
<th class="text-center" width="5%">No</th>
<th width="15%">Dept / Folder</th>
<th width="15%">Kategori</th>
<th width="20%">Nomor Dokumen</th>
<th width="30%">Judul Dokumen</th>
<th class="text-center" width="6%">Versi</th>
<th width="9%">Tgl Upload</th>
</tr>
</thead>
<tbody>
@foreach($dataExport as $index => $sop)
@php
$versi = substr(trim($sop->nomor_sop), -2);
if (!is_numeric($versi)) {
$versi = substr(trim($sop->judul_sop), -2);
if (!is_numeric($versi)) $versi = '-';
}
@endphp
<tr>
<td class="text-center">{{ $index + 1 }}</td>
<td><b>{{ $sop->nama_departemen ?? '-' }}</b></td>
<td>{{ $sop->nama_kategori ?? '-' }}</td>
<td>{{ $sop->nomor_sop }}</td>
<td>{{ $sop->judul_sop }}</td>
<td class="text-center"><span class="badge">v.{{ $versi }}</span></td>
<td>{{ \Carbon\Carbon::createFromTimestamp($sop->tanggal_dibuat)->format('d/m/Y') }}</td>
</tr>
@endforeach
</tbody>
</table>
</body>
</html>