<?php $__env->startSection('content'); ?>
<div class="container-fluid py-4">
    <div class="row">
        <div class="col-12">
            <div class="card shadow-sm">
                <div class="card-header bg-primary text-white">
                    <h5 class="mb-0"><i class="bi bi-check-circle me-2"></i>Verifikasi Lembar Jawab IKK</h5>
                </div>
                <div class="card-body">
                    <?php if(session('success')): ?>
                        <div class="alert alert-success alert-dismissible fade show" role="alert">
                            <i class="bi bi-check-circle me-2"></i><?php echo e(session('success')); ?>

                            <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                        </div>
                    <?php endif; ?>

                    <?php if(session('error')): ?>
                        <div class="alert alert-danger alert-dismissible fade show" role="alert">
                            <i class="bi bi-exclamation-circle me-2"></i><?php echo e(session('error')); ?>

                            <button type="button" class="btn-close" data-bs-dismiss="alert"></button>
                        </div>
                    <?php endif; ?>

                    <!-- Filter Form -->
                    <form method="GET" action="<?php echo e(route('ikk.verifikasi.index')); ?>" class="mb-4">
                        <div class="row g-3">
                            <div class="col-md-3">
                                <label class="form-label fw-bold">OPD</label>
                                <select name="opd" class="form-select">
                                    <option value="">-- Semua OPD --</option>
                                    <?php $__currentLoopData = $opdList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $opdItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($opdItem); ?>" <?php echo e($opd == $opdItem ? 'selected' : ''); ?>>
                                            <?php echo e($opdItem); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                            <div class="col-md-2">
                                <label class="form-label fw-bold">Tahun</label>
                                <select name="tahun" class="form-select">
                                    <option value="">-- Semua --</option>
                                    <?php $__currentLoopData = $tahunList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $tahunItem): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($tahunItem); ?>" <?php echo e($tahun == $tahunItem ? 'selected' : ''); ?>>
                                            <?php echo e($tahunItem); ?>

                                        </option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                            <div class="col-md-3">
                                <label class="form-label fw-bold">Status</label>
                                <select name="status" class="form-select">
                                    <option value="">-- Semua Status --</option>
                                    <option value="DIAJUKAN" <?php echo e($status == 'DIAJUKAN' ? 'selected' : ''); ?>>Menunggu Verifikasi</option>
                                    <option value="DIVERIFIKASI" <?php echo e($status == 'DIVERIFIKASI' ? 'selected' : ''); ?>>Diverifikasi</option>
                                    <option value="PERLU PERBAIKAN" <?php echo e($status == 'PERLU PERBAIKAN' ? 'selected' : ''); ?>>Perlu Perbaikan</option>
                                </select>
                            </div>
                            <div class="col-md-4 d-flex align-items-end">
                                <button type="submit" class="btn btn-primary me-2">
                                    <i class="bi bi-funnel me-1"></i>Filter
                                </button>
                                <a href="<?php echo e(route('ikk.verifikasi.index')); ?>" class="btn btn-outline-secondary">
                                    <i class="bi bi-arrow-clockwise me-1"></i>Reset
                                </a>
                            </div>
                        </div>
                    </form>

                    <!-- Table -->
                    <div class="table-responsive">
                        <table class="table table-hover table-bordered align-middle">
                            <thead class="table-light">
                                <tr>
                                    <th width="50">No</th>
                                    <th>Kode IKK</th>
                                    <th>IKK Output</th>
                                    <th>OPD</th>
                                    <th width="80">Tahun</th>
                                    <th width="100">Capaian</th>
                                    <th width="150">Status</th>
                                    <th width="150">Aksi</th>
                                </tr>
                            </thead>
                            <tbody>
                                <?php $__empty_1 = true; $__currentLoopData = $lembarJawab; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                <tr>
                                    <td class="text-center"><?php echo e($index + 1); ?></td>
                                    <td><strong><?php echo e($item->kode_ikk); ?></strong></td>
                                    <td><?php echo e($item->ikk_output); ?></td>
                                    <td><?php echo e($item->opd); ?></td>
                                    <td class="text-center"><?php echo e($item->tahun); ?></td>
                                    <td class="text-end"><?php echo e($item->capaian); ?></td>
                                    <td>
                                        <?php if($item->status == 'DRAFT'): ?>
                                            <span class="badge bg-secondary">Draft</span>
                                        <?php elseif($item->status == 'DIAJUKAN'): ?>
                                            <span class="badge bg-warning text-dark">Menunggu Verifikasi</span>
                                        <?php elseif($item->status == 'DIVERIFIKASI'): ?>
                                            <span class="badge bg-success">Diverifikasi</span>
                                        <?php elseif($item->status == 'PERLU PERBAIKAN'): ?>
                                            <span class="badge bg-danger">Perlu Perbaikan</span>
                                        <?php endif; ?>
                                    </td>
                                    <td class="text-center">
                                        <a href="<?php echo e(route('ikk.verifikasi.show', $item->id)); ?>"
                                           class="btn btn-sm btn-primary"
                                           title="Lihat Detail & Verifikasi">
                                            <i class="bi bi-eye me-1"></i>Detail
                                        </a>
                                    </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                <tr>
                                    <td colspan="8" class="text-center text-muted py-4">
                                        <i class="bi bi-inbox fs-1 d-block mb-2"></i>
                                        Tidak ada data yang perlu diverifikasi
                                    </td>
                                </tr>
                                <?php endif; ?>
                            </tbody>
                        </table>
                    </div>

                    <?php if($lembarJawab->count() > 0): ?>
                    <div class="mt-3">
                        <small class="text-muted">Total: <?php echo e($lembarJawab->count()); ?> data</small>
                    </div>
                    <?php endif; ?>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/user/Documents/giriwidyan/project/inhouse/skm/resources/views/ikk/verifikasi/index.blade.php ENDPATH**/ ?>