<?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('nhapdulieutrungtuyen')); ?>" class="breadcrumbs-link">NHẬP DỮ LIỆU TRÚNG 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_trungtuyen')); ?>" method="get">
                        <i class="fa-solid fa-magnifying-glass"></i>
                        <input type="search" name="search" size="0" placeholder="Nhập id hoặc họ tên để tìm kiếm" class="page-search-bar--input">
                    </form>
                    <div class="page-table-nav">
                        <div class="paginationWrap ">
                        <?php if(isset($danhSach) && count($danhSach) > 0): ?>
                            <?php echo e($danhSach->links('admin.paginationtrungtuyen')); ?>

                        <?php endif; ?>
                        </div>
                    </div>
                </div>
                <?php echo $__env->make('alert', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                <form action="<?php echo e(route('post_nhapdulieutrungtuyen')); ?>" method="post" class="add-record-table add-record-table--transparent" enctype="multipart/form-data">
                    <table class="table">
                        <tr>
                            <td width="100px" class="form-field-label--required">File .xlsx</td>
                            <td>
                                <input type="file" name="fileUpload" accept=".xlsx" required>
                            </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="Nhập" name= "nhap" id="nhap" class="add-record-table--button">
                                </label>
                            </td>
                        </tr>
                    </table>
                    <?php echo csrf_field(); ?>
                </form>
                <div class="page-table">
                    <table class="table">
                        <thead>
                            <tr>
                                <?php $__currentLoopData = $headers; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $header): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <th width="1px"><?php echo e($header->Field); ?></th>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <th width="1px" class="small">Xóa</th>
                                <th width="1px" class="small">Chi tiết</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $danhSach; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $form): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <?php
                                    $i = 0;
                                ?>
                                <?php $__currentLoopData = $form; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $colKey => $colVal): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <td>
                                        <?php if($i == 0): ?>
                                        <form id="form<?php echo e($form->stt); ?>" action="<?php echo e(route( 'update_nhapdulieutrungtuyen')); ?>" method="POST">
                                            <?php echo csrf_field(); ?>
                                            <input type="hidden" value="<?php echo e($form->stt); ?>" name="stt"> 
                                            <?php echo e($form->stt); ?>

                                        </form>
                                        <?php else: ?>
                                        <textarea cols="10" oninput='autoresizeTextarea(this)' name="<?php echo e($colKey); ?>" form="form<?php echo e($form->stt); ?>" class="editable-textarea"><?php echo e($colVal); ?></textarea>
                                        <?php endif; ?>

                                        <?php
                                            $i++;
                                        ?>
                                    </td>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <td>
                                    <a href="<?php echo e(route( 'del_nhapdulieutrungtuyen', ['stt' => $form->stt] )); ?>" 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>
                                    <button type="submit" form="form<?php echo e($form->stt); ?>">
                                        <i class="fas fa-save"></i>
                                    </button>
                                </td>
                            </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </tbody>
                    </table>
                </div>
                <div class="page-table-nav">
                    <div class="paginationWrap ">
                    <?php if(isset($danhSach) && count($danhSach) > 0): ?>
                        <?php echo e($danhSach->links('admin.paginationtrungtuyen')); ?>

                    <?php endif; ?>
                    </div>
                </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/bduedu/public_html/xltt.bdu.edu.vn/resources/views/admin/nhapDuLieuTrungTuyen.blade.php ENDPATH**/ ?>