sistem-akademik/resources/views/filament/pages/student-report.blade.php
2025-05-15 10:02:57 +07:00

78 lines
4.2 KiB
PHP

<x-filament-panels::page>
{{ $this->form }}
@if(!empty($this->list))
<div class="fi-ta-ctn overflow-hidden rounded-lg bg-white shadow-sm ring-1 ring-gray-200 dark:bg-gray-900 dark:ring-gray-800">
<div class="fi-ta-content overflow-x-auto">
<table class="fi-ta-table w-full border-collapse">
<thead class="bg-gray-50 dark:bg-gray-800">
<!-- Baris Judul Kelompok -->
<tr>
<th rowspan="2" class="fi-ta-header-cell px-4 py-3 text-left border-b border-gray-200 dark:border-gray-700">
<span class="text-sm font-medium text-gray-900 dark:text-white">
{{ $this->list['header']['name'] }}
</span>
</th>
@foreach(['umum', 'muatan lokal'] as $category)
@if(!empty($this->list['header'][$category]))
<th colspan="{{ count($this->list['header'][$category]) }}" class="fi-ta-header-cell px-4 py-3 text-center border-b border-gray-200 dark:border-gray-700">
<span class="text-sm font-medium text-gray-900 dark:text-white">
{{ ucfirst($category) }}
</span>
</th>
@endif
@endforeach
</tr>
<!-- Baris Mata Pelajaran -->
<tr>
@foreach(['umum', 'muatan lokal'] as $category)
@if(!empty($this->list['header'][$category]))
@foreach($this->list['header'][$category] as $subjectName)
<th class="fi-ta-header-cell px-4 py-3 text-center border-b border-gray-200 dark:border-gray-700">
<span class="text-sm font-medium text-gray-900 dark:text-white">
{{ $subjectName }}
</span>
</th>
@endforeach
@endif
@endforeach
</tr>
</thead>
<tbody class="divide-y divide-gray-200 dark:divide-gray-700">
@foreach($this->list['data'] as $student)
<tr class="hover:bg-gray-50 dark:hover:bg-gray-800/50">
<!-- Kolom Nama -->
<td class="fi-ta-cell px-4 py-3 border-b border-gray-200 dark:border-gray-700">
<span class="text-sm text-gray-900 dark:text-white">
{{ $student['name'] }}
</span>
</td>
<!-- Nilai Mata Pelajaran -->
@foreach(['umum', 'muatan lokal'] as $category)
@if(!empty($this->list['header'][$category]))
@foreach($this->list['header'][$category] as $subjectId => $subjectName)
<td class="fi-ta-cell px-4 py-3 text-center border-b border-gray-200 dark:border-gray-700">
<span class="text-sm text-gray-900 dark:text-white">
{{ $student[$category][$subjectId] ?? '-' }}
</span>
</td>
@endforeach
@endif
@endforeach
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
@else
<div class="mt-6 p-4 bg-gray-100 rounded-lg text-gray-600 dark:bg-gray-800 dark:text-gray-300">
Pilih Kelas, Tahun Akademik, dan Semester untuk melihat laporan siswa.
</div>
@endif
</x-filament-panels::page>