@extends('layouts.app')

@section('title', 'Data Penilaian Skripsi')

@section('content')
<div class="card">
    <div class="card-header"><h3 class="card-title">Daftar Mahasiswa Ujian</h3></div>
    <div class="card-body">
        <table class="table table-hover datatables">
            <thead>
                <tr>
                    <th width="50">No</th>
                    <th>NIM</th>
                    <th>Nama Mahasiswa</th>
                    <th>Judul Skripsi</th>
                    <th>Progress Penilaian</th>
                    <th>Rata-rata</th>
                    <th width="120">Aksi</th>
                </tr>
            </thead>
            <tbody>
                @foreach($mahasiswa_ujian as $index => $mhs)
                <tr>
                    <td>{{ $index + 1 }}</td>
                    <td>{{ $mhs->nim_mahasiswa }}</td>
                    <td>{{ $mhs->nama_mahasiswa }}</td>
                    <td>{{ $mhs->judul_skripsi }}</td>
                    <td>
                        <span class="badge badge-info p-2" style="border-radius: 8px;">
                            {{ $mhs->jumlah_dinilai }} / {{ $mhs->jumlah_penguji }} Penguji
                        </span>
                    </td>
                    <td>
                        <strong class="text-primary">{{ number_format($mhs->rata_rata, 2) }}</strong>
                    </td>
                    <td>
                        <a href="{{ route('penilaian.detail', $mhs->nim_mahasiswa) }}" class="btn btn-primary btn-sm btn-block">
                            <i class="fas fa-eye mr-1"></i> Detail
                        </a>
                    </td>
                </tr>
                @endforeach
            </tbody>
        </table>
    </div>
</div>
@endsection
