<?php $__env->startSection('content'); ?>
    <div class="container-fluid px-xxl-65 px-xl-20 mt-20">
        <div class="row">
            <div class="col-sm-12">
                <div class="alert alert-info" role="alert">
                    <h4 class="alert-heading mb-10">Catatan Perihal Peminjaman Buku</h4>
                    <p>Beberapa hal yang dapat di sampaikan kepada siswa mengenai peraturan dalam peminjaman buku
                        di perpustakaan SD 6 Muhammadiyah Palembang
                    </p>
                    <hr class="hr-soft-info">
                    <?php
                        $cek_denda = DB::Table('denda')->get();
                    ?>
                    <ul class="list-ul">
                        <li class="mb-5"><span>Siswa Di Wajibkan Mendaftarkan diri sebagai Anggota Perpustakaan Untuk Bisa
                                Melaukan Peminjaman Buku</span></li>
                        <li><span>Waktu Peminjaman Buku Hanya 7 Hari. Apabila Melewati Waktu Pengembalian Akan Di Kena Kan
                                Denda</span></li>
                        <?php $__empty_1 = true; $__currentLoopData = $cek_denda; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cek_denda): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <li><span>Tarif Denda Yaitu Rp. <?php echo e($cek_denda->nominal_denda); ?> / Hari</span></li>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <li><span>Tarif Denda Yaitu Rp. 1000 / Hari</span></li>
                        <?php endif; ?>
                        <li><span>Apabila Buku Hilang Maka Siswa Diberlakukan denda Rp.50.000 / Buku</span></li>
                    </ul>
                </div>
            </div>
        </div>
        <?php if(session('fail')): ?>
        <div class="alert alert-danger alert-wth-icon fade show" role="alert">
            <span class="alert-icon-wrap"><i class="zmdi zmdi-block"></i></span>
            <?php echo e(session('fail')); ?>

        </div>
        <?php endif; ?>
        <div class="row">
            <div class="col-xl-12">
                <div class="row">
                    <?php $__currentLoopData = $siswa; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $siswa): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="col-md-6">
                            <div class="card text-white">
                                <div class="card-body bg-white" style="color:black">
                                    <div class="row">
                                        <div class="col-4">
                                            <?php if($siswa->foto == null): ?>
                                                <img src="/perpus/default.jpg" height="100" width="100" alt="">
                                            <?php else: ?>
                                                <img src="/foto_siswa/<?php echo e($siswa->foto); ?>" height="100" width="100"
                                                    alt="">
                                            <?php endif; ?>
                                        </div>
                                        <div class="col-8">
                                            <table border="0">
                                                <thead>
                                                </thead>
                                                <tbody>
                                                    <tr>
                                                        <td style="padding: 3px"><b>Nama Lengkap</b></td>
                                                        <td><b>&nbsp;: </b></td>
                                                        <td>
                                                            &nbsp;<?php echo e(Str::upper($siswa->nama_siswa)); ?>

                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding: 3px"><b>NIS</b></td>
                                                        <td><b>&nbsp;: </b></td>
                                                        <td>
                                                            &nbsp;<?php echo e(Str::upper($siswa->nis)); ?>

                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding: 3px"><b>Kelas</b></td>
                                                        <td><b>&nbsp;: </b></td>
                                                        <td>
                                                            &nbsp;<?php echo e(Str::upper($siswa->jenis_kelas)); ?>

                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding: 3px"><b>Jenis Kelamin</b></td>
                                                        <td><b>&nbsp;: </b></td>
                                                        <td>
                                                            <?php if($siswa->jenis_kelamin == 'l'): ?>
                                                                &nbsp;Laki - Laki
                                                            <?php else: ?>
                                                                &nbsp;Perempuan
                                                            <?php endif; ?>
                                                        </td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </div>
                                    </div>
                                    <div class="row mt-2">
                                        <div class="col-6">
                                            <span>
                                                <?php echo DNS1D::getBarcodeHTML($siswa->barcode, 'C39'); ?>

                                            </span>
                                        </div>
                                    </div>
                                    <p class="card-title"><?php echo e($siswa->barcode); ?></p>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="card text-white">
                                <div class="card-header">
                                    <p style="color: black">Pemilihan Buku Untuk Di Pinjam <span style="color:red">*
                                            Maksimal 3 Buku</span></p>
                                </div>
                                <div class="card-body bg-white" style="color:black">
                                    <p class="text-mute" style="color:grey">Scan Kode Buku Agar Lebih Cepat Dalam Proses
                                        Pemesanan</p>
                                    <form action="<?php echo e(route('peminjaman.store')); ?>" method="post"
                                        enctype="multipart/form-data">
                                        <?php echo csrf_field(); ?>
                                        <?php echo method_field('post'); ?>
                                        <input type="text" name="siswa" value="<?php echo e($siswa->id_siswa); ?>" id="" hidden>
                                        <label for="" class="mt-10">Buku 1</label>
                                        <select class="form-control select2 <?php $__errorArgs = ['buku1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                            name="buku1" autofocus>
                                            <option value="">Pilih Buku</option>
                                            <optgroup label="Daftar Buku">
                                                <?php $__currentLoopData = $buku; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($data->id_buku); ?>">[<?php echo e($data->kode_buku); ?>] -
                                                        <?php echo e(Str::title($data->nama_buku)); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </optgroup>
                                        </select>
                                        <?php $__errorArgs = ['buku1'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?>
                                            <span class="invalid-feedback"><?php echo e($message); ?></span>
                                        <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>
                                        <label for="" class="mt-10">Buku 2</label>
                                        <select class="form-control select2" name="buku2" autofocus>
                                            <option value="">Pilih Buku</option>
                                            <optgroup label="Daftar Buku">
                                                <?php $__currentLoopData = $buku; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($data->id_buku); ?>">[<?php echo e($data->kode_buku); ?>] -
                                                        <?php echo e(Str::title($data->nama_buku)); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </optgroup>
                                        </select>
                                        <label for="" class="mt-10">Buku 3</label>
                                        <select class="form-control select2" name="buku3" autofocus>
                                            <option value="">Pilih Buku</option>
                                            <optgroup label="Daftar Buku">
                                                <?php $__currentLoopData = $buku; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($data->id_buku); ?>">[<?php echo e($data->kode_buku); ?>] -
                                                        <?php echo e(Str::title($data->nama_buku)); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </optgroup>
                                        </select>
                                        <button class="btn btn-success w-100 mt-10" type="submit" name="submit">Proses
                                            Peminjaman Buku</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
            </div>
        </div>
    </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('css'); ?>
    <!-- select2 CSS -->
    <link href="/theme/vendors/select2/dist/css/select2.min.css" rel="stylesheet" type="text/css" />
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
    <!-- Select2 JavaScript -->
    <script src="/theme/vendors/select2/dist/js/select2.full.min.js"></script>
    <script src="/theme/dist/js/select2-data.js"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('petugas.theme.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\perpustakaan\resources\views/petugas/peminjaman/peminjaman_cek.blade.php ENDPATH**/ ?>