112 lines
3.1 KiB
PHP
112 lines
3.1 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Data Tahun Ajaran</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 20px;
|
|
}
|
|
.header {
|
|
text-align: center;
|
|
margin-bottom: 30px;
|
|
}
|
|
.header h1 {
|
|
margin: 0;
|
|
font-size: 24px;
|
|
color: #333;
|
|
}
|
|
.header p {
|
|
margin: 5px 0;
|
|
color: #666;
|
|
}
|
|
table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
margin-top: 20px;
|
|
}
|
|
table, th, td {
|
|
border: 1px solid #ddd;
|
|
}
|
|
th, td {
|
|
padding: 12px;
|
|
text-align: left;
|
|
}
|
|
th {
|
|
background-color: #f4f4f4;
|
|
font-weight: bold;
|
|
}
|
|
tr:nth-child(even) {
|
|
background-color: #f9f9f9;
|
|
}
|
|
.text-center {
|
|
text-align: center;
|
|
}
|
|
.badge {
|
|
padding: 4px 8px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
font-weight: bold;
|
|
}
|
|
.badge-success {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
}
|
|
.badge-secondary {
|
|
background-color: #e2e3e5;
|
|
color: #383d41;
|
|
}
|
|
.footer {
|
|
margin-top: 30px;
|
|
text-align: right;
|
|
font-size: 12px;
|
|
color: #666;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="header">
|
|
<h1>DATA TAHUN AJARAN</h1>
|
|
<p>Laporan Lengkap Tahun Ajaran</p>
|
|
<p>Dicetak pada: {{ date('d/m/Y H:i:s') }}</p>
|
|
</div>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th class="text-center">No</th>
|
|
<th>Nama Tahun Ajaran</th>
|
|
<th class="text-center">Tanggal Mulai</th>
|
|
<th class="text-center">Tanggal Selesai</th>
|
|
<th class="text-center">Status</th>
|
|
<th class="text-center">Durasi (Hari)</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach($tahunAjarans as $index => $tahunAjaran)
|
|
<tr>
|
|
<td class="text-center">{{ $index + 1 }}</td>
|
|
<td>{{ $tahunAjaran->nama }}</td>
|
|
<td class="text-center">{{ $tahunAjaran->tanggal_mulai->format('d/m/Y') }}</td>
|
|
<td class="text-center">{{ $tahunAjaran->tanggal_selesai->format('d/m/Y') }}</td>
|
|
<td class="text-center">
|
|
@if($tahunAjaran->is_active)
|
|
<span class="badge badge-success">Aktif</span>
|
|
@else
|
|
<span class="badge badge-secondary">Tidak Aktif</span>
|
|
@endif
|
|
</td>
|
|
<td class="text-center">
|
|
{{ $tahunAjaran->tanggal_mulai->diffInDays($tahunAjaran->tanggal_selesai) }} hari
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
|
|
<div class="footer">
|
|
<p>Total Tahun Ajaran: {{ count($tahunAjarans) }}</p>
|
|
<p>Tahun Ajaran Aktif: {{ $tahunAjarans->where('is_active', true)->count() }}</p>
|
|
</div>
|
|
</body>
|
|
</html> |