60 lines
2.4 KiB
PHP
60 lines
2.4 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Laporan Data Karyawan</title>
|
|
<style>
|
|
body { font-family: Helvetica, Arial, sans-serif; font-size: 10px; }
|
|
table { width: 100%; border-collapse: collapse; margin-top: 20px; }
|
|
th, td { border: 1px solid #cbd5e1; padding: 6px; text-align: left; }
|
|
th { background-color: #f8fafc; font-weight: bold; text-transform: uppercase; }
|
|
.header { border-bottom: 2px solid #334155; padding-bottom: 10px; margin-bottom: 10px; }
|
|
.header h2 { margin: 0 0 5px 0; font-size: 18px; color: #1e293b; }
|
|
.header p { margin: 2px 0; font-size: 11px; color: #64748b; }
|
|
.badge-active { color: #16a34a; font-weight: bold; }
|
|
.badge-inactive { color: #dc2626; font-weight: bold; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="header">
|
|
<h2>Laporan Data Karyawan</h2>
|
|
<p><b>Total Data:</b> {{ $employees->count() }} Karyawan (Sesuai Filter)</p>
|
|
<p><b>Dicetak pada:</b> {{ \Carbon\Carbon::now()->translatedFormat('d F Y - H:i:s') }}</p>
|
|
<p><b>Dicetak oleh:</b> {{ auth()->user()->first_name }} {{ auth()->user()->last_name }}</p>
|
|
</div>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th width="3%">No</th>
|
|
<th width="12%">NIK & Inisial</th>
|
|
<th width="20%">Nama Lengkap</th>
|
|
<th width="15%">Email</th>
|
|
<th width="5%">L/P</th>
|
|
<th width="15%">Departemen</th>
|
|
<th width="15%">Jabatan</th>
|
|
<th width="10%">Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($employees as $index => $emp)
|
|
<tr>
|
|
<td style="text-align: center;">{{ $index + 1 }}</td>
|
|
<td>{{ $emp->nik }} <br> <small>{{ strtoupper($emp->initial ?? '') }}</small></td>
|
|
<td>{{ $emp->first_name }} {{ $emp->last_name }}</td>
|
|
<td>{{ $emp->email }}</td>
|
|
<td style="text-align: center;">{{ $emp->gender }}</td>
|
|
<td>{{ $emp->department->name ?? '-' }}</td>
|
|
<td>{{ $emp->position->name ?? '-' }}</td>
|
|
<td>
|
|
<span class="{{ $emp->is_active ? 'badge-active' : 'badge-inactive' }}">
|
|
{{ $emp->is_active ? 'Aktif' : 'Non-Aktif' }}
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
</body>
|
|
</html> |