73 lines
4.1 KiB
PHP
73 lines
4.1 KiB
PHP
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
</head>
|
|
<body>
|
|
<table>
|
|
<!-- Header Info Institusi -->
|
|
<tr>
|
|
<td colspan="8" style="font-size: 14pt; font-weight: bold; height: 30px; vertical-align: middle; color: #1E293B;">ROBOTKU SCHOOL - MASTER JADWAL KELAS MINGGUAN</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="8" style="font-size: 10pt; color: #475569;">Tanggal Export: {{ date('d F Y H:i') }} | Total Jadwal: {{ count($jadwalMaster) }} Kelas</td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2" style="background-color: #FFF3CD; color: #856404; font-weight: bold; border: 1px solid #F6AD55; text-align: center;">■ Kelas Reguler</td>
|
|
<td colspan="2" style="background-color: #D1ECF1; color: #0C5460; font-weight: bold; border: 1px solid #3182CE; text-align: center;">■ Kelas Ekstrakurikuler</td>
|
|
<td colspan="4"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="8" style="height: 15px;"></td>
|
|
</tr>
|
|
|
|
<!-- Table Header Hari -->
|
|
<thead>
|
|
<tr>
|
|
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 140px; height: 30px; vertical-align: middle;">Waktu / Sesi</th>
|
|
@foreach($days as $dayNum => $dayName)
|
|
<th style="background-color: #1E293B; color: #FFFFFF; font-weight: bold; text-align: center; border: 1px solid #0F172A; width: 180px; height: 30px; vertical-align: middle;">{{ $dayName }}</th>
|
|
@endforeach
|
|
</tr>
|
|
</thead>
|
|
|
|
<!-- Table Body Sesi x Hari -->
|
|
<tbody>
|
|
@foreach($sesiList as $sesi)
|
|
<tr>
|
|
<!-- Kolom Sesi -->
|
|
<td style="background-color: #F8FAFC; font-weight: bold; text-align: center; vertical-align: middle; border: 1px solid #CBD5E1; height: 90px;">
|
|
<span style="font-weight: bold; color: #1E293B;">{{ $sesi->nama_sesi }}</span><br>
|
|
<span style="font-size: 8.5pt; color: #64748B;">{{ $sesi->jam }}</span>
|
|
</td>
|
|
|
|
<!-- Kolom Hari 1 s/d 7 -->
|
|
@foreach($days as $dayNum => $dayName)
|
|
@php
|
|
$items = $jadwalGrouped->get("{$dayNum}-{$sesi->id}", collect());
|
|
@endphp
|
|
<td style="vertical-align: top; border: 1px solid #E2E8F0; padding: 4px;">
|
|
@foreach($items as $item)
|
|
@php
|
|
$isEkstra = $item->kelas && $item->kelas->is_ekstrakurikuler == 1;
|
|
$bgColor = $isEkstra ? '#EBF8FF' : '#FFF8F0';
|
|
$borderColor = $isEkstra ? '#3182CE' : '#F6AD55';
|
|
$titleColor = $isEkstra ? '#2B6CB0' : '#DD6B20';
|
|
$guruNama = $item->guru ? $item->guru->nama : ($item->kelas && $item->kelas->guru ? $item->kelas->guru->nama : '-');
|
|
$ruanganNama = $item->ruangan ? $item->ruangan->nama_ruangan : ($item->kelas && $item->kelas->ruangan_fix ? $item->kelas->ruangan_fix->nama_ruangan : '-');
|
|
@endphp
|
|
<div style="background-color: {{ $bgColor }}; border: 1px solid {{ $borderColor }}; padding: 6px; margin-bottom: 4px; border-radius: 4px;">
|
|
<span style="font-weight: bold; color: {{ $titleColor }}; font-size: 9.5pt;">{{ $item->kelas ? $item->kelas->nama_kelas : 'Kelas' }}</span><br>
|
|
<span style="font-size: 8.5pt; color: #4A5568;">Pengajar: {{ $guruNama }}</span><br>
|
|
<span style="font-size: 8pt; color: #718096;">Ruang: {{ $ruanganNama }}</span>
|
|
</div>
|
|
@endforeach
|
|
</td>
|
|
@endforeach
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|