sistem-akademik/resources/views/filament/pages/student-report.blade.php
2025-05-16 18:27:42 +07:00

97 lines
5.4 KiB
PHP

<x-filament-panels::page xmlns:x-filament="http://www.w3.org/1999/html">
{{ $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','seni', '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
<th rowspan="2" class="fi-ta-header-cell text-center 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">
Action
</span>
</th>
</tr>
<!-- Baris Mata Pelajaran -->
<tr>
@foreach(['umum', 'seni', '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>
@foreach(['umum', 'seni','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
<td class="fi-ta-cell w-full flex justify-center px-4 py-3 border-b border-gray-200 dark:border-gray-700">
<x-filament::button
tag="a"
target="_blank"
href="{{ route('filament.admin.pages.report-preview', [
'studentId' => $student['id'],
'classId' => $this->class_id,
'yearId' => $this->academic_year,
'semester' => $this->semester
]) }}"
>
Raport
</x-filament::button>
</td>
</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>