<?php $__env->startSection('title', 'List note'); ?>
<?php $__env->startSection('link'); ?>
<!-- Data Table Css -->
<link rel="stylesheet" href="<?php echo e(asset('bower_components/datatables.net-bs4/css/dataTables.bootstrap4.min.css')); ?>">
<link rel="stylesheet" href="<?php echo e(asset('assets/pages/data-table/css/buttons.dataTables.min.css')); ?>">
<link rel="stylesheet" href="<?php echo e(asset('bower_components/datatables.net-responsive-bs4/css/responsive.bootstrap4.min.css')); ?>">
<style>
    .dataTables_length label{
        display: none;
    }
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="pcoded-inner-content">
    <?php echo $__env->make('includes._alert', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <div class="main-body">
        <div class="page-wrapper">
            <div class="page-body">
                <div class="row">
                    <div class="col-sm-12">
                        <div class="card">
                            <div class="card-header pb-0 mb-0">
                                <div class="d-flex justify-content-between pb-0 mb-0">
                                    <h4>Notes - 
                                        <strong style="font-size: 19px"><?php echo e(ucfirst($class->libelle)); ?></strong>
                                    </h4>
                                    <span class="form-control-variant" style="font-size: 17px">
                                        <strong class="mr-2"><?php echo e(ucfirst($decoup->cutting->libelle.' [ '.($matter->matter->abbreviated ?? $matter->matter->libelle).' ]')); ?></strong>
                                    </span>
                                    <span>
                                        <button class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-2" title="Approuvez les moyennes" data-toggle="modal" data-target="#ModalConfirm" style="display: <?php echo e($approved ? 'none':''); ?>"><i class="fa fa-thumbs-up m-0"></i></button>
                                        <?php if(!$approved): ?>
                                        <a href="<?php echo e(route('evaluation.bonnus', $string)); ?>" class="btn btn-inverse btn-outline-inverse  btn-sm py-1 mx-1" title="Bonnus moyenne"><i class="fa fa-qrcode mx-0"></i></a>
                                        <?php endif; ?>
                                        <a href="<?php echo e(route('evaluation.pdf', $string)); ?>" target="_blank" class="btn btn-inverse btn-outline-inverse  btn-sm py-1 mx-1" title="Télécharger la fiche"><i class="fa fa-download mx-0"></i></a>
                                        <a href="<?php echo e(route('evaluation.return', $class->id.'_'.$matter->id)); ?>" class="btn btn-inverse btn-outline-inverse  btn-sm py-1 ml-1" title="Return Back"><i class="fas fa-reply mx-0"></i></a>
                                    </span>
                                </div>
                            </div>
                            <hr class="mx-3 mt-0">
                            <div class="card-block">
                                <div class="dt-responsive table-responsive px-lg-3">
                                    <table id="saving-reorder" class="table table-striped table-bordered nowrap">
                                        <thead>
                                            <tr>
                                                <th class="text-center" style="width: 5px"></th>
                                                <th class="text-uppercase" style="width: 20px">Matricule</th>
                                                <th class="text-uppercase" style="width: 80px">Nom et prénoms</th>
                                                <th class="text-uppercase" style="width: 10px">Genre</th>
                                                <?php for($i = 0; $i < $eval; $i++): ?>
                                                <th class="text-center text-uppercase" title="Note <?php echo e($i+1); ?>">N<?php echo e($i+1); ?></th>
                                                <?php endfor; ?>
                                                <th class="text-uppercase text-center" style="width: 15px">Moyenne</th>
                                                <th class="text-uppercase text-center" style="width: 5%">Rang</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php $t = 1 ?>
                                            <?php $__currentLoopData = $datas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <th class="text-center py-1">
                                                    <img src="<?php echo e(asset($item['sexe'] == 'F' ? 'assets/images/stdt1_woman.png':'assets/images/stdt1_man.png')); ?>" class="img-radius m-0 p-0" alt="Photo Stuedent" style="height: 40px; width: 40px; border: 1px solid grey">
                                                    <?php $t++; ?>
                                                </th>
                                                <td class="py-2"><div class="mt-2"><?php echo e($item['matricule']); ?></div></td>
                                                <td class="py-2" title="<?php echo e($item['name']); ?>">
                                                    <div class="mt-2"><?php echo e(Str::limit($item['name'], '27', '...')); ?></div>
                                                </td>
                                                <td class="py-2"><div class="mt-2"><?php echo e(ucfirst($item['sexe'] == 'F' ? 'Féminin':'Masculin')); ?></div></td>
                                                <?php for($i = 0; $i < $eval; $i++): ?>
                                                <td class="text-center py-2">
                                                    <div class="mt-2"><?php echo e($item['notes'][$i]['note'] ?? 'nc'); ?></div>
                                                </td>
                                                <?php endfor; ?>
                                                <th class="py-2 text-center">
                                                    <div class="mt-2"><?php echo e($item['moyen'] ? $item['moyen']['moyenne']:calculMoyenneMatter($item['notes'])); ?></div>
                                                </th>
                                                <td class="py-2 text-center">
                                                    <div class="mt-2"><?php echo e($item['moyen'] ? $item['moyen']['rang']:'--'); ?></div>
                                                </td>
                                            </tr>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?> 
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="modal fade" id="ModalConfirm" tabindex="-1" role="dialog" aria-labelledby="ModalConfirmTitle" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered" role="document">
      <div class="modal-content">
        <div class="modal-header bg-dark py-2">
          <h5 class="modal-title" id="ModalConfirmLongTitle">Confirmation</h5>
          <span style="font-size: 17px"><?php echo e(ucfirst($decoup->cutting->libelle)); ?></span>
        </div>
        <div class="modal-body py-3 text-center">
            <p class="mt-2">
                <strong style="font-size: 19px">Confirmation des moyenne !</strong>
            </p>
            " Apres cette action plus de modification <br> ou de suppression à votre niveau "
        </div>
        <div class="modal-footer">
            <button class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-2" data-dismiss="modal">Annuler</button>
            <a href="<?php echo e(route('evaluation.approved', $string)); ?>" class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-2">Valider</a>
        </div>
      </div>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
    <!-- data-table js -->
    <script src="<?php echo e(asset('bower_components/datatables.net/js/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('bower_components/datatables.net-buttons/js/dataTables.buttons.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/pages/data-table/extensions/autofill/js/dataTables.autoFill.min.js')); ?>"></script>
    <script src="<?php echo e(asset('bower_components/datatables.net-buttons/js/buttons.print.min.js')); ?>"></script>
    <script src="<?php echo e(asset('bower_components/datatables.net-buttons/js/buttons.html5.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/pages/data-table/js/dataTables.bootstrap4.min.js')); ?>"></script>
    <script src="<?php echo e(asset('bower_components/datatables.net-responsive/js/dataTables.responsive.min.js')); ?>"></script>
    <script src="<?php echo e(asset('bower_components/datatables.net-responsive-bs4/js/responsive.bootstrap4.min.js')); ?>"></script>
    <!-- Custom js -->
    <script src="<?php echo e(asset('assets/pages/data-table/extensions/colreorder/js/colreorder-custom.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/pcoded.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/vartical-layout.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/jquery.mCustomScrollbar.concat.min.js')); ?>"></script>
    <script>
        $(document).ready(function(){

            // Autoriser les touches numériques (0-9) et la touche backspace (code 8)
            $('.myInput').on('keypress', function(e) {
                var charCode = e.which ? e.which : e.keyCode;
                if (charCode < 48 || charCode > 57) {
                    e.preventDefault(); // Empêche la saisie si ce n'est pas un chiffre
                }
            });

            $('#btnEdit').on('click', function(){
                $('#btnSubmit').slideDown();
                $(this).slideUp();
                $('.myInput').css('border','1px #000 dashed');
            });
        })
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/educasnsa/public_html/neuroschool/resources/views/pages/evaluations/list_note.blade.php ENDPATH**/ ?>