<?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('quanlythongtin')); ?>" class="breadcrumbs-link">QUẢN LÝ THÔNG TIN</a>
                        </li>
                        <li>
                            <a href="<?php echo e(route('dotxettuyen')); ?>" class="breadcrumbs-link">ĐỢT XÉT TUYỂN</a>
                        </li>
                    </ul>
                    <a href="<?php echo e(route('quanlythongtin')); ?>" class="page-button">
                        <i class="fa-solid fa-rotate-left"></i> Quay lại
                    </a>
                </div>
                <div class="page-tool-bar">
                    <form class="page-search-bar" action="<?php echo e(route('search_dotxettuyen')); ?>" method="get">
                        <i class="fa-solid fa-magnifying-glass"></i>
                        <input type="search" name="search" size="0" placeholder="Nhập vào tên đợt hoặc thời gian (d-m-Y) để tìm kiếm" class="page-search-bar--input">
                    </form>
                </div>
                <form action="<?php echo e(route('save_dotxettuyen')); ?>" method="POST">
                <div class="page-form-table ">
                    <label for="table-form-label"
                    class="page-button table-form__label table-form__label--float-right">
                    <i class="fas fa-save"></i>
                    <input type="submit" size="0" class="table-form__submit-button" id="table-form-label"
                        value="Lưu trạng thái">
                    </label>
                </div>
                <div class="page-table">
                    <table class="table">
                        <thead>
                            <tr>
                                <th class="small">STT</th>
                                <th >Đợt xét tuyển</th>
                                <th >Hiện kết quả</th>
                                <th >Kích hoạt</th>
                                <th class="small">Sửa</th>
                                <th class="small">Xóa</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $dots; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dot): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($dot->MaDotXetTuyen); ?></td>
                                <td><?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))); ?></td>
                                <td>
                                    <input <?php echo e(($dot->HienKetQua==0)?'':'checked'); ?> type="checkbox" name ="kqs[<?php echo e($dot->MaDotXetTuyen); ?>]" value="<?php echo e($dot->MaDotXetTuyen); ?>" class="table-checkbox"/>
                                </td>
                                <td>
                                    <input <?php echo e(($dot->KichHoat==0)?'':'checked'); ?> type="radio" name ="khs" value="<?php echo e($dot->MaDotXetTuyen); ?>" class="table-checkbox"/>
                                </td>
                                <td>
                                    <span class="table-icon"
                                        data-length = "4"
                                        data-0 = "<?php echo e($dot->TenDot); ?>"
                                        data-1 = "<?php echo e(date('Y-m-d', strtotime($dot->NgayBatDau))); ?>"
                                        data-2 = "<?php echo e(date('Y-m-d', strtotime($dot->NgayKetThuc))); ?>"
                                        data-3 = "<?php echo e($dot->MaDotXetTuyen); ?>"
                                        onclick="loadRecordData(this)">
                                        <i class="fa-solid fa-file-pen"></i>
                                    </span>
                                </td>
                                <td>
                                    <a href="<?php echo e(route('del_dotxettuyen',$dot->MaDotXetTuyen)); ?>" 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>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
                <?php echo csrf_field(); ?>
                </form>
                <form action="<?php echo e(route('edit_dotxettuyen')); ?>" method="post" id="form-nhap-lieu" class="add-record-table">
                    <table class="table">
                        <tr>
                            <?php echo $__env->make('alert', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                            <td class="form-field-label--required"> Tên đợt</td>
                            <td>
                                <input type="text" placeholder="Nhập tên đợt" name="tenDot" name="maDXT" id="inp-0" class="add-record-table--input add-record-table--input-text">
                            </td>
                        </tr>
                        <tr>
                            <td class="form-field-label--required">Ngày bắt đầu</td>
                            <td>
                                <input type="date" placeholder="Ngày bắt đầu" name="ngayBatdau" id="inp-1" class="add-record-table--input add-record-table--input-text">
                            </td>
                        </tr>
                        <tr>
                            <td class="form-field-label--required">Ngày kết thúc</td>
                            <td>
                                <input type="date" placeholder="Ngày kết thúc" name="ngayKetthuc" id="inp-2" class="add-record-table--input add-record-table--input-text">
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <input type="hidden" name="maDotXetTuyen" id="inp-3" class="add-record-table--input add-record-table--input-text">
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <label class="add-record-table--button-block" for="them">
                                    <i class="fa-solid fa-plus"></i>
                                    <input type="submit" value="Thêm" name="them" id="them" class="add-record-table--button">
                                </label>
                                <label class="add-record-table--button-block" for="luu">
                                    <i class="fa-solid fa-pencil"></i>
                                    <input type="submit" value="Sửa" name="luu" id="luu" class="add-record-table--button">
                                </label>
                                <label class="add-record-table--button-block" for="xoa">
                                    <i class="fa-solid fa-eraser"></i>
                                    <input type="reset" value="Xóa" name="xoa" id="xoa" class="add-record-table--button">
                                </label>
                            </td>
                        </tr>
                    </table>
                    <?php echo csrf_field(); ?>
                </form>
            </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/dotxettuyen.blade.php ENDPATH**/ ?>