<?php if (isset($component)) { $__componentOriginal1f9e5f64f242295036c059d9dc1c375c = $component; } ?>
<?php if (isset($attributes)) { $__attributesOriginal1f9e5f64f242295036c059d9dc1c375c = $attributes; } ?>
<?php $component = App\View\Components\Layout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? $attributes->all() : [])); ?>
<?php $component->withName('layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag): ?>
<?php $attributes = $attributes->except(\App\View\Components\Layout::ignoredParameterNames()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
     <?php $__env->slot('title', null, []); ?> <?php echo e($title); ?> <?php $__env->endSlot(); ?>

    
    <div class="mb-3">
        <a href="<?php echo e(asset('assets/import-excel/format-student.xlsx')); ?>" download class="btn btn-warning btn-sm mb-2 me-2"
            type="button">
            <i class="fa-solid fa-download me-1"></i>
            Download Format Import
        </a>
        <a href="/student-eksport-excel" class="btn btn-danger btn-sm mb-2 me-2" type="button">
            <i class="fa-solid fa-download me-1"></i>
            Export Excel
        </a>
        <button class="btn btn-success btn-sm mb-2 me-2" type="button" data-bs-toggle="modal"
            data-bs-target="#import-excel">
            <i class="fa-solid fa-upload me-1"></i>
            Import Excel
        </button>
    </div>

    <div class="card card-responsive mb-3">
        <div class="card-header d-flex align-items-center justify-content-between">
            <h5 class="mb-0">Data Students</h5>
            <button class="btn btn-primary btn-sm mb-2" type="button" data-bs-toggle="modal"
                data-bs-target="#modalTambastudent">
                <i class="fa-solid fa-person-circle-plus me-1"></i>
                Tambah
            </button>
        </div>
        <div class="card-body">
            <div class="table-responsive text-nowrap">
                <table id="myTable" class="table table-striped" width="100%">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Nis</th>
                            <th>Nama</th>
                            <th>Gender</th>
                            <th>Class</th>
                            <th>Tahun Masuk</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $studentList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <?php
                                $kelas = new \App\Models\ClassRoom();
                            ?>
                            <tr>
                                <td><?php echo e($loop->iteration); ?></td>
                                <td><?php echo e($list->nis); ?></td>
                                <td><?php echo e($list->name); ?></td>
                                <td><?php echo e($list->gender); ?></td>
                                <td><?php echo e($kelas->now_class($list->tahun_masuk, $list->class->name_class)); ?> </td>
                                <td><?php echo e($list->tahun_masuk); ?></td>
                                <td>
                                    <a href="/student/transaksi/<?php echo e($list->id); ?>" type="button"
                                        class="btn btn-primary btn-sm">
                                        <i class="bx bx-credit-card"></i>
                                    </a>
                                    <button type="button" class="btn btn-warning btn-sm" data-bs-toggle="modal"
                                        data-bs-target="#modalEditStudent<?php echo e($list->id); ?>">
                                        <i class="bx bx-edit"></i>
                                    </button>
                                    <a type="button" id="btn-hapus" href="delete-student/<?php echo e($list->id); ?>"
                                        class="btn btn-danger btn-sm">
                                        <i class="bx bx-trash"></i>
                                    </a>
                                </td>
                            </tr>

                            <div class="modal fade" id="modalEditStudent<?php echo e($list->id); ?>" tabindex="-1"
                                aria-hidden="true">
                                <div class="modal-dialog" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h5 class="modal-title" id="exampleModalLabel3">Edit Data Students</h5>
                                            <button type="button" class="btn-close" data-bs-dismiss="modal"
                                                aria-label="Close"></button>
                                        </div>
                                        <form action="updateStudent" method="post">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('PUT'); ?>
                                            <div class="modal-body">
                                                <input type="hidden" name="id" value="<?php echo e($list->id); ?>">
                                                <div class="row mb-3">
                                                    <div class="col">
                                                        <label class="form-label">Nis</label>
                                                        <input type="text" name="nis" class="form-control"
                                                            placeholder="Enter Nis" value="<?php echo e($list->nis); ?>"
                                                            autocomplete="off">
                                                    </div>
                                                    <div class="col">
                                                        <label class="form-label">Nama</label>
                                                        <input type="text" name="name" class="form-control"
                                                            placeholder="Enter Nama" value="<?php echo e($list->name); ?>"
                                                            autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="row mb-3">
                                                    <div class="col">
                                                        <label for="gender" class="form-label">Jenis
                                                            Kelamin</label>
                                                        <select class="form-select" id="gender" name="gender"
                                                            aria-label="Default select example">
                                                            <option value="Laki-Laki"
                                                                <?php if($list->gender == 'Laki-Laki'): ?> selected <?php endif; ?>>
                                                                Laki-Laki</option>
                                                            <option value="Perempuan"
                                                                <?php if($list->gender == 'Perempuan'): ?> selected <?php endif; ?>>
                                                                Perempuan</option>
                                                        </select>
                                                    </div>
                                                    <div class="col">
                                                        <label for="class_id" class="form-label">Class</label>
                                                        <select class="form-select" id="class_id" name="class_id"
                                                            aria-label="Default select example">
                                                            <?php $__currentLoopData = $class; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $las): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                <option value="<?php echo e($las->id); ?>"
                                                                    <?php if($list->class_id == $las->id): ?> selected <?php endif; ?>>
                                                                    <?php echo e($las->name_class); ?></option>
                                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="row mb-3">
                                                    <div class="col">
                                                        <label class="form-label">Tanggal Lahir</label>
                                                        <input type="date" name="tanggal_lahir"
                                                            class="form-control" value="<?php echo e($list->tanggal_lahir); ?>"
                                                            autocomplete="off">
                                                    </div>
                                                    <div class="col">
                                                        <label class="form-label">Tahun Masuk</label>
                                                        <input type="text" name="tahun_masuk" class="form-control"
                                                            placeholder="Tahun Masuk"
                                                            value="<?php echo e($list->tahun_masuk); ?>" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="mb-3">
                                                    <label class="form-label" for="telp">No Telepon</label>
                                                    <div class="input-group input-group-merge">
                                                        <span class="input-group-text">
                                                            IND (+62)
                                                        </span>
                                                        <input type="text" class="form-control" name="telp"
                                                            placeholder="81234567890" value="<?php echo e($list->telp); ?>" aria-label="81234567890"
                                                            id="telp" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div>
                                                    <label for="exampleFormControlTextarea1"
                                                        class="form-label">Alamat</label>
                                                    <textarea class="form-control" name="alamat" id="exampleFormControlTextarea1" rows="2"><?php echo e($list->alamat); ?></textarea>
                                                </div>
                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-outline-secondary"
                                                    data-bs-dismiss="modal">Close</button>
                                                <button type="submit" name="save" class="btn btn-primary"
                                                    id="btn-save">Save</button>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>

            </div>
        </div>
    </div>



    <div class="modal fade" id="modalTambastudent" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel3">Tambah Data Students</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <form action="simpanSiswa" method="post">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <div class="row mb-3">
                            <div class="col-6">
                                <label class="form-label">Nis</label>
                                <input type="text" name="nis" class="form-control" placeholder="Enter Nis"
                                    autocomplete="off">
                            </div>
                            <div class="col-6">
                                <label class="form-label">Nama</label>
                                <input type="text" name="name" class="form-control" placeholder="Nama Lengkap"
                                    autocomplete="off">
                            </div>
                        </div>
                        <div class="row mb-3">
                            <div class="col-6">
                                <label for="gender" class="form-label">Jenis Kelamin</label>
                                <select class="form-select" id="gender" name="gender"
                                    aria-label="Default select example">
                                    <option value="Laki-Laki">Laki-Laki</option>
                                    <option value="Perempuan">Perempuan</option>
                                </select>
                            </div>
                            <div class="col-6">
                                <label for="class_id" class="form-label">Class</label>
                                <select class="form-select" id="class_id" name="class_id"
                                    aria-label="Default select example">
                                    <?php $__currentLoopData = $class; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $las): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <option value="<?php echo e($las->id); ?>"><?php echo e($las->name_class); ?></option>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                        </div>
                        <div class="row mb-3">
                            <div class="col-6">
                                <label class="form-label">Tanggal Lahir</label>
                                <input type="date" name="tanggal_lahir" class="form-control" autocomplete="off">
                            </div>
                            <div class="col-6">
                                <label class="form-label">Tahun Masuk</label>
                                <input type="text" name="tahun_masuk" class="form-control"
                                    placeholder="Tahun Masuk" autocomplete="off">
                            </div>
                        </div>
                        <div class="row mb-3">
                            <div class="col-6">
                                <label class="form-label" for="telp">No Telepon</label>
                                <div class="input-group input-group-merge">
                                    <span class="input-group-text">
                                        IND (+62)
                                    </span>
                                    <input type="text" class="form-control" name="telp"
                                        placeholder="81234567890" aria-label="81234567890" id="telp"
                                        autocomplete="off">
                                </div>
                            </div>
                            <div class="col-6 form-password-toggle">
                                <label class="form-label" for="password32">Password <span
                                        class="text-danger">(Default 1234)</span></label>
                                <div class="input-group input-group-merge">
                                    <input type="password" class="form-control" name="password" id="password32"
                                        placeholder="············" aria-describedby="password" value="1234"
                                        autocomplete="off">
                                    <span class="input-group-text cursor-pointer" id="password">
                                        <i class="bx bx-hide"></i>
                                    </span>
                                </div>
                            </div>
                        </div>
                        <div>
                            <label for="exampleFormControlTextarea1" class="form-label">Alamat</label>
                            <textarea class="form-control" name="alamat" id="exampleFormControlTextarea1" rows="2"></textarea>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-outline-secondary"
                            data-bs-dismiss="modal">Close</button>
                        <button type="submit" name="save" class="btn btn-primary">Save</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

    <div class="modal fade" id="import-excel" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLabel3">Import Excel</h5>
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                </div>
                <form action="student-import-excel" method="post" enctype="multipart/form-data">
                    <?php echo csrf_field(); ?>
                    <div class="modal-body">
                        <div class="mb-3">
                            <label class="form-label">Pilih FIle</label>
                            <input type="file" name="excel" class="form-control"
                                accept=".csv, application/vnd.ms-excel, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                                placeholder="Enter Nama" autocomplete="off" required>
                        </div>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-outline-secondary"
                            data-bs-dismiss="modal">Close</button>
                        <button type="submit" name="save" class="btn btn-primary">Save</button>
                    </div>
                </form>
            </div>
        </div>
    </div>

 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__attributesOriginal1f9e5f64f242295036c059d9dc1c375c)): ?>
<?php $attributes = $__attributesOriginal1f9e5f64f242295036c059d9dc1c375c; ?>
<?php unset($__attributesOriginal1f9e5f64f242295036c059d9dc1c375c); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal1f9e5f64f242295036c059d9dc1c375c)): ?>
<?php $component = $__componentOriginal1f9e5f64f242295036c059d9dc1c375c; ?>
<?php unset($__componentOriginal1f9e5f64f242295036c059d9dc1c375c); ?>
<?php endif; ?>
<?php /**PATH C:\Users\USER\Downloads\Compressed\Pembayaran-SPP-main\resources\views/student.blade.php ENDPATH**/ ?>