<x-guru-layout>
    <x-slot name="header">
        <h2 class="font-semibold text-xl text-gray-800 leading-tight">
            {{ __('Detail Nilai') }}
        </h2>
    </x-slot>

<div class="py-12">
    <div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
        <div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
            <div class="p-6">


    <h2>Rekap Nilai: {{ $santri->nama }}</h2>
    <a href="{{ url()->previous() }}" class="btn btn-secondary mb-3">Kembali</a>
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>No</th>
                <th>Tanggal</th>
                <th>Mata Pelajaran</th>
                <th>Nilai</th>
                <th>Keterangan</th>
            </tr>
        </thead>
        <tbody>
            @foreach($nilaiList as $i => $nilai)
            <tr>
                <td>{{ $i+1 }}</td>
                <td>{{ $nilai->tanggal }}</td>
                <td>{{ $nilai->mapel->nama_mapel ?? '-' }}</td>
                <td>{{ $nilai->nilai }}</td>
                <td>{{ $nilai->keterangan }}</td>
            </tr>
            @endforeach
        </tbody>
    </table>

            </div>
        </div>
    </div>
</div>
@endsection 
