<?php $__env->startSection('content'); ?>
<div class="clearfix">
    <div class="full-width-container">
        <?php echo $__env->make('masterHeaderAdmin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
        <main class="main-container">
            <?php echo $__env->make('masterSidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <div class="page-body">
                <div class="nav-breadcrumbs">
                    <ul class="breadcrumbs">
                        <li>
                            <a href="<?php echo e(route('admin')); ?>" class="breadcrumbs-link">TRANG CHỦ</a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('ketquaxettuyen')); ?>" class="breadcrumbs-link">KẾT QUẢ XÉT TUYỂN</a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('lop12')); ?>" class="breadcrumbs-link">XÉT THEO HỌC BẠ LỚP 12</a>
                        </li>
                    </ul>
                    <a href="<?php echo e(route('ketquaxettuyen')); ?>" class="page-button">
                        <i class="fa-solid fa-rotate-left"></i> Quay lại
                    </a>
                </div>
                <div class="page-tool-bar">
                    <form class="form-timkiem" action="<?php echo e(route('search_lop12')); ?>" method="get">
                        <div>
                            <label class="page-search-bar">
                            <i class="fa-solid fa-magnifying-glass"></i>
                            <input type="search" name="search" value="<?php echo e($search); ?>" size="0" placeholder="Nhập tên, căn cước công dân hoặc email" class="page-search-bar--input">
                            </label>
                        </div>
                        <div class="page-select-batch">
                            <label class="label-dot">
                            <i class="fa-solid fa-calendar-days"></i>
                            </label>
                            <select class="page-select-batch--select" name="dot" id="dot" >
                                <option value="0" selected>--- Đợt xét tuyển ---</option>
                                <?php $__currentLoopData = $dotxettuyens; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dot): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($dot->MaDotXetTuyen); ?>" <?php echo e($selectedDot == $dot->MaDotXetTuyen ? 'selected' : ''); ?>><?php echo e($dot->TenDot); ?> : <?php echo e(date('d-m-Y', strtotime($dot->NgayBatDau))); ?> - <?php echo e(date('d-m-Y', strtotime($dot->NgayKetThuc))); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            </select>
                        </div>
                        <div class="page-select-state">
                            <label>Tất cả</label>
                            <input type="radio" value="0" name="state" class="page-select-state__radio-btn" <?php echo e($ketqua == '0' ? 'checked' : ''); ?>>
                            <label>Đạt</label>
                            <input type="radio" value="-1" name="state" class="page-select-state__radio-btn" <?php echo e($ketqua == '-1' ? 'checked' : ''); ?>>
                            <label>Không đạt</label>
                            <input type="radio" value="1" name="state" class="page-select-state__radio-btn" <?php echo e($ketqua == '1' ? 'checked' : ''); ?>>
                        </div>
                        <button type="input" class="page-button table-form__label table-form__label--float-right">
                            <i class="fa-solid fa-magnifying-glass"></i>
                            Tìm kiếm
                        </button>
                        <?php if(!empty($selectedDot) && $selectedDot != 0): ?>
							<a href="<?php echo e(route('export3', ['id' => $selectedDot])); ?>" class="page-button">
								<i class="fa-solid fa-file-export"></i>
								Xuất file
							</a>
						<?php else: ?>
							<a href="#" class="page-button" onclick="alert('Vui lòng tìm kiếm đợt xét tuyển trước khi xuất kết quả'); return false;">
								<i class="fa-solid fa-file-export"></i>
								Xuất file
							</a>
						<?php endif; ?>
                    <?php echo csrf_field(); ?>
                    </form>
                    <div class="page-table-nav">
                        <div class="paginationWrap ">
                            <?php if(isset($forms) && count($forms) > 0): ?>
                                <?php echo e($forms->links('admin.templatepagination')); ?>

                            <?php endif; ?>
                        </div>
                    </div>
                </div>
                <div class="page-table">
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="small">STT</th>
                                <th>Tên</th>
                                <th>Ngày sinh</th>
                                <th>CCCD/CMND</th>
                                <th>Giới tính</th>
                                <th>Email</th>
                                <th>Địa chỉ</th>
                                <th>Tên trường</th>
                                <th>Tên ngành</th>
                                <th>Ngày đăng ký</th>
                                <th>Kết quả</th>
                                <th class="small">Xóa</th>
                                <th class="small">Chi tiết</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $forms; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $form): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($form->MaForm); ?></td>
                                <td><?php echo e($form->HoTen); ?></td>
                                <td><?php echo e(date('d-m-Y', strtotime($form->NgaySinh))); ?></td>
                                <td><?php echo e($form->CCCD); ?></td>
                                <td><?php if($form->GioiTinh == 0): ?>
                                        Nữ
                                    <?php else: ?>
                                        Nam
                                    <?php endif; ?>
                                </td>
                                <td><?php echo e($form->Email); ?></td>
                                <td><?php echo e($form->DiaChi); ?></td>
                                <td><?php echo e($form->truong->TenTruong); ?></td>
                                <td><?php echo e($form->nganhhoc->TenNganhHoc); ?></td>
                                <td><?php echo e(date('d-m-Y', strtotime($form->NgayDangKy))); ?></td>
                                <td class="<?php echo e(($form->KetQua == '0')?'page-table--status-waiting':'page-table--status-pass'); ?>">
                                    <?php if($form->KetQua == '0'): ?>
                                        Không đạt
                                    <?php else: ?>
                                        Đạt
                                    <?php endif; ?>
                                </td>
                                <td>
                                    <a href="<?php echo e(route('del_lop12',$form->MaForm)); ?>" onclick="return confirm('Bạn có chắc muốn xóa mục này? Thao tác này không thể hoàn trả.')" class="table-icon">
                                        <i class="fa-solid fa-trash"></i>
                                    </a>
                                </td>
                                <td>
                                    <a href="<?php echo e(route('lop12_chitiet',$form->MaForm)); ?>" class="table-icon">
                                        <i class="fa-regular fa-folder-open"></i>
                                    </a>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>

                </div>
                <div class="page-table-nav">
                    <div class="paginationWrap ">
                        <?php if(isset($forms) && count($forms) > 0): ?>
                            <?php echo e($forms->links('admin.templatepagination')); ?>

                        <?php endif; ?>
                    </div>
                </div>
            </div>
        </main>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('masterAdmin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/demo/public_html/resources/views/admin/ketQuaXetTuyen_hocBaLop12.blade.php ENDPATH**/ ?>