<?php $__env->startSection('title', 'Hasil Assessment'); ?>

<?php $__env->startSection('content'); ?>
    <div class="row justify-content-center">
        <div class="col-lg-10">
            <div class="card card-form">
                <div class="card-header">
                    <h2><i class="fas fa-chart-pie"></i> Hasil Assessment</h2>
                    <p class="mb-0 mt-2">Hasil Penilaian Mandiri Kompetensi tahun <?php echo e($tahun); ?></p>
                </div>
                <div class="card-body">
                    <form method="GET" class="mb-3">
                        <div class="row g-2">
                            <div class="col-md-9">
                                <input type="number" name="tahun" class="form-control" value="<?php echo e($tahun); ?>" min="2020"
                                    max="<?php echo e(now()->year + 1); ?>">
                            </div>
                            <div class="col-md-3">
                                <button class="btn btn-outline-primary w-100">Lihat</button>
                            </div>
                        </div>
                    </form>

                    <div class="alert alert-info">
                        <div class="row">
                            <div class="col-md-3"><strong><?php echo e($hasil['persentase']); ?>%</strong><br><small>Pemenuhan</small>
                            </div>
                            <div class="col-md-3"><strong><?php echo e($hasil['kategori']); ?></strong><br><small>Kategori</small></div>
                            <div class="col-md-3"><strong><?php echo e($hasil['ya']); ?></strong><br><small>Jawaban Ya</small></div>
                            <div class="col-md-3"><strong><?php echo e($hasil['tidak']); ?></strong><br><small>Perlu
                                    Pengembangan</small></div>
                        </div>
                    </div>

                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th>Kompetensi</th>
                                    <th>Indikator</th>
                                    <th>Jawaban</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $hasil['rows']; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                    <tr>
                                        <td>
                                            <strong><?php echo e($row['kompetensi']->nama_kompetensi); ?></strong><br>
                                            <small class="text-muted"><?php echo e($row['kompetensi']->jenis_label); ?></small>
                                        </td>
                                        <td><?php echo e($row['indikator']->pertanyaan); ?></td>
                                        <td>
                                            <?php if($row['jawaban'] === 'ya'): ?>
                                                <span class="badge bg-success">Ya</span>
                                            <?php elseif($row['jawaban'] === 'tidak'): ?>
                                                <span class="badge bg-warning text-dark">Tidak</span>
                                            <?php else: ?>
                                                <span class="badge bg-secondary">Belum Diisi</span>
                                            <?php endif; ?>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                    <tr>
                                        <td colspan="3" class="text-center text-muted py-4">Belum ada standar kompetensi.</td>
                                    </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>

                    <a href="<?php echo e(route('pegawai.assessment.form', ['tahun' => $tahun])); ?>" class="btn btn-primary">Isi/Ubah
                        Assessment</a>
                    <a href="<?php echo e(route('pegawai.assessment.rekomendasi', ['tahun' => $tahun])); ?>"
                        class="btn btn-outline-success">Lihat Rekomendasi</a>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\Skripsi-M\resources\views/pegawai/assessment-kompetensi/hasil.blade.php ENDPATH**/ ?>