<?php $__env->startSection('title'); ?>
Penilaian
<?php $__env->stopSection(); ?>

<?php $__env->startPush('before-script'); ?>

<?php if(session('status')): ?>
<?php if (isset($component)) { $__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Sweetalertsession::class, ['tipe' => ''.e(session('tipe')).'','status' => ''.e(session('status')).'']); ?>
<?php $component->withName('sweetalertsession'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5)): ?>
<?php $component = $__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5; ?>
<?php unset($__componentOriginal6bb91b748cddfa526a1e6a6c5efd3ee0dde567e5); ?>
<?php endif; ?>
<?php endif; ?>
<?php $__env->stopPush(); ?>


<?php $__env->startSection('content'); ?>
<section class="section">
    <div class="section-header">
        <h1><?php echo $__env->yieldContent('title'); ?></h1>
        <div class="section-header-breadcrumb">
            <div class="breadcrumb-item active"><a href="<?php echo e(route('dashboard')); ?>">Dashboard</a></div>
            
            <div class="breadcrumb-item"><?php echo $__env->yieldContent('title'); ?></div>
        </div>
    </div>

    <div class="section-body">
        <div class="card">
            <div class="card-body">

                <form action="<?php echo e(route('guru.penilaian.cari')); ?>" method="GET" class="d-inline">
                    <div class="row mt-0">

                            <div class="col-4 col-md-2">
                                <input type="text" class="form-control form-control-sm" name="cari" placeholder="Cari . . ." autocomplete="off" value="<?php echo e($request->cari!=null ? $request->cari : ''); ?>">
                            </div>
                            <div class="col-4 col-md-2">

                                <select class="js-example-basic-single py-0  <?php $__errorArgs = ['kelas_id'];
$__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="kelas_id"  style="width: 100%" >

                                <option disabled selected value=""> Pilih Kelas</option>
                                <?php $__currentLoopData = $kelas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $t): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <option value="<?php echo e($t->id); ?>"> <?php echo e($t->tingkatan); ?> <?php echo e($t->jurusan); ?> <?php echo e($t->suffix); ?> </option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                            </div>
                            <div class="col-4 col-md-2">
                                    <button class="btn btn-info ml-0 mt-0 mt-sm-0 px-4 py-1 " type="submit"
                                        value="Cari"> <span class="pcoded-micon"><i class="fas fa-search"></i> Cari </button>


                            </div>
                            <div class="col-12 col-md-6 mt-2 mt-md-0 text-right">

                            </div>

                    </div>
                </form>

                <?php if (isset($component)) { $__componentOriginal7f6fe7bbf5512b742c0bcffa8025ccbaf91ac921 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Jsmultidel::class, ['link' => ''.e(route('mapel.multidel')).'']); ?>
<?php $component->withName('jsmultidel'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal7f6fe7bbf5512b742c0bcffa8025ccbaf91ac921)): ?>
<?php $component = $__componentOriginal7f6fe7bbf5512b742c0bcffa8025ccbaf91ac921; ?>
<?php unset($__componentOriginal7f6fe7bbf5512b742c0bcffa8025ccbaf91ac921); ?>
<?php endif; ?>

                <?php if($datas->count()>0): ?>
                    <?php if (isset($component)) { $__componentOriginalbea8fd2875612672ec60fa7e39941fa4202cfa75 = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\Jsdatatable::class, []); ?>
<?php $component->withName('jsdatatable'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
<?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginalbea8fd2875612672ec60fa7e39941fa4202cfa75)): ?>
<?php $component = $__componentOriginalbea8fd2875612672ec60fa7e39941fa4202cfa75; ?>
<?php unset($__componentOriginalbea8fd2875612672ec60fa7e39941fa4202cfa75); ?>
<?php endif; ?>
                <?php endif; ?>

                <table id="example" class="table table-striped table-bordered mt-1 table-sm" style="width:100%">
                    <thead>
                        <tr style="background-color: #F1F1F1">
                            <th class="text-center py-2 babeng-min-row">
                                No</th>
                            <th >Mapel</th>
                            <th >Kelas</th>
                            <th >Guru Pengajar</th>
                            <th >Detail</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__empty_1 = true; $__currentLoopData = $datas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr id="sid<?php echo e($data->id); ?>">
                                <td class="text-center">
                                    <?php echo e(((($loop->index)+1)+(($datas->currentPage()-1)*$datas->perPage()))); ?></td>
                                <td>
                                    <?php echo e($data->mapel!=null ? $data->mapel->nama : 'Data tidak ditemukan'); ?>

                                </td>
                                <td>
                                    <?php echo e($data->kelas!=null ? $data->kelas->tingkatan.' '.$data->kelas->jurusan.' '.$data->kelas->suffix : 'Data tidak ditemukan'); ?>

                                </td>

                                <td  data-toggle="modal" data-target="#pilihguru<?php echo e($data->id); ?>">
                                    <label for="" class="text-<?php echo e($data->guru!=null ? 'dark' : 'danger'); ?>"><?php echo e($data->guru!=null ? $data->guru->nama : 'Data tidak ditemukan'); ?></label>
                                </td>


                                <td class="text-center babeng-min-row">

                                    <a href="<?php echo e(route('guru.penilaian.inputnilai',$data->id)); ?>" type="button" class="btn btn-outline-info btn-sm" data-toggle="tooltip" data-placement="top" title="Input Nilai Siswa!" >
                                        <i class="far fa-star"></i>
                                    </a>

                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                            <tr>
                                <td colspan="5" class="text-center">Data tidak ditemukan</td>
                            </tr>
                        <?php endif; ?>
                    </tbody>
                </table>

<?php
$cari=$request->cari;
?>
<?php echo e($datas->onEachSide(1)
  ->links()); ?>


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

<?php $__env->startSection('containermodal'); ?>
        <?php $__empty_1 = true; $__currentLoopData = $datas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
              <div class="modal fade" id="pilihguru<?php echo e($data->id); ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
                <div class="modal-dialog" role="document">
                  <form method="post" action="<?php echo e(route('store.pengajar',$data->id)); ?>" enctype="multipart/form-data">
                    <div class="modal-content">
                      <div class="modal-header">
                        <h5 class="modal-title" id="exampleModalLabel">Pilih Guru Pengajar <?php echo e($data->tingkatan); ?> <?php echo e($data->jurusan); ?> <?php echo e($data->suffix); ?></h5>
                      </div>
                      <div class="modal-body">

                        <?php echo e(csrf_field()); ?>


                        <div class="form-group">
                            <select class="js-example-basic-single form-control-sm <?php $__errorArgs = ['guru_id'];
$__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="guru_id"  style="width: 75%" required>
                            <?php if($data->guru!=null): ?>
                            <option value="<?php echo e($data->guru->id); ?>" selected> <?php echo e($data->guru->nama); ?></option>
                            <?php else: ?>
                            <option disabled selected value=""> Pilih Walikelas</option>
                            <?php endif; ?>
                            <?php $__currentLoopData = $guru; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $t): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($t->id); ?>"> <?php echo e($t->nama); ?></option>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                          </select>
                        </div>

                      </div>
                      <div class="modal-footer">
                        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                        <button type="submit" class="btn btn-primary">Simpan</button>
                      </div>
                    </div>
                  </form>
                </div>
              </div>


              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>

              <?php endif; ?>


<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.default', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\Xampp 8.2\htdocs\sim\resources\views/pages/guru/penilaian/index.blade.php ENDPATH**/ ?>