<?php $__env->startSection('title', 'Gestion des appels'); ?>
<?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>
    .btn.btn-icons {
        border-radius: 3px;
        width: 30px;
        line-height: 15px;
        height: 25px;
        padding: 2px;
        text-align: center;
    }
    .dataTables_length label{
        display: none;
    }
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="pcoded-inner-content">
    <?php echo $__env->make('includes._alert', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->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 mb-0 pb-0">
                                <div class="d-flex justify-content-between mb-0 pb-0">
                                    <h4><?php echo e($cndte->matter->libelle.' ~ '. ucfirst($cutting->cutting->libelle)); ?></h4>
                                    <p class="m-0" style="font-size: 17px"><strong><?php echo e($classe['libelle']); ?></strong></p>
                                    <div class="right">
                                        <span style="float: right">
                                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php endif; ?><?php if(!$approved): ?>
                                                <button class="btn btn-inverse btn-outline-inverse  btn-sm py-1 mr-1" id="modalBtn" title="Approuvé"><i class="fas fa-thumbs-up mx-0"></i></button>
                                                <button class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-1" id="file" title="Export File"> <i class="fas fa-download m-0"></i></button>
                                            <?php endif; ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php endif; ?>
                                            <a href="<?php echo e(route('sanction.show', $classe->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>
                            </div>
                            <hr class="mx-3 my-0">
                            <div class="card-block">
                                <div class="dt-responsive table-responsive">
                                    <table id="myTable" class="table table-striped table-bordered nowrap" style="width: 100%">
                                        <thead>
                                            <tr>
                                                <th class="text-center" style="width: 5%"></th>
                                                <th class="text-center" style="width: 10%">Matricule</th>
                                                <th class="text-center" style="width: 25%">Nom & Prenoms</th>
                                                <th class="text-center" style="width: 7%">Sexe</th>
                                                <th class="text-center" style="width: 10%">Assiduité</th>
                                                <th class="text-center" style="width: 10%">Discipline</th>
                                                <th class="text-center" style="width: 10%">Moralite</th>
                                                <th class="text-center" style="width: 10%">Tenue</th>
                                                <th class="text-center" style="width: 8%">Moyenne</th>
                                                <th class="text-center" style="width: 5%">Rang</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if BLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::openLoop(); ?><?php endif; ?><?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::startLoop($loop->index); ?><?php endif; ?>
                                            <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">
                                                </th>
                                                <td class="text-center"><?php echo e($item['matricule']); ?></td>
                                                <td class="px-3" title="<?php echo e($item['name']); ?>">
                                                    <?php echo e(Str::limit($item['name'], '27', '...')); ?> <strong class="text-danger" style="display: <?php echo e($item['conseil'] ? 'online':'none'); ?>">*</strong>
                                                </td>
                                                <td class="text-center"><?php echo e($item['sexe']); ?></td>
                                                <td class="text-center"><?php echo e($item['assiduite'] <= 9 ? '0'.$item['assiduite']:$item['assiduite']); ?></td>
                                                <td class="text-center"><?php echo e($item['discipline'] <= 9 ? '0'.$item['discipline']:$item['discipline']); ?></td>
                                                <td class="text-center"><?php echo e($item['moralite'] <= 9 ? '0'.$item['moralite']:$item['moralite']); ?></td>
                                                <td class="text-center"><?php echo e($item['tenue'] <= 9 ? '0'.$item['tenue']:$item['tenue']); ?></td>
                                                <td class="text-center"><?php echo e($item['moyen']); ?></td>
                                                <td class="text-center"><?php echo e($item['rang']); ?></td>
                                            </tr>
                                            <?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::endLoop(); ?><?php endif; ?><?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?><?php if(\Livewire\Mechanisms\ExtendBlade\ExtendBlade::isRenderingLivewireComponent()): ?><!--[if ENDBLOCK]><![endif]--><?php \Livewire\Features\SupportCompiledWireKeys\SupportCompiledWireKeys::closeLoop(); ?><?php endif; ?>
                                        </tbody>
                                    </table> 
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- Modal -->
<div class="modal fade" id="getModal" tabindex="-1" role="dialog" aria-labelledby="getModalLabel" 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="getModalLongTitle">Moyenne Conduite</h5>
            </div>
            <form action="<?php echo e(route('conduite.store')); ?>" method="post" id="formEvaluats">
                <?php echo csrf_field(); ?>
                <div class="modal-body">
                    <p class="text-center">Validation des moyennes de conduites</p>
                    <div class="text-center" style="font-weight: 800;"><?php echo e(ucfirst($cutting->cutting->libelle)); ?></div>
                    <input type="hidden" name="classe" value="<?php echo e($classe->id); ?>">
                    <input type="hidden" name="cutting" value="<?php echo e($cutting->id); ?>">
                    <input type="hidden" name="matter" value="<?php echo e($cndte->id); ?>">
                </div>
                <div class="modal-footer">
                    <button class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-2" data-dismiss="modal">Annuler</button>
                    <button type="submit" class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-2">Valider</button>
                </div>
            </form>
        </div>
    </div>
</div>
<!-- Modal File -->
<div class="modal fade" id="fileModal" tabindex="-1" role="dialog" aria-labelledby="fileModalTitle" 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="fileModalLongTitle">Import File</h5>
        </div>
        <form action="<?php echo e(route('conduite.import', $classe->id.'_'.$cutting->id)); ?>" method="post" enctype="multipart/form-data">
            <?php echo csrf_field(); ?>
            <div class="modal-body py-2"> 
                <div class="form-group pt-3">
                    <span class="d-flex justify-content-between mb-2">
                        <label for="firstNameUser">Charger la fiche<span class="text-danger">*</span> : </label>
                        <a href="<?php echo e(route('conduite.export', $classe->id.'_'.$cutting->id)); ?>" class="btn btn-inverse btn-outline-inverse btn-icons py-1" title="DownLoad File Example"><i class="fas fa-download mx-0"></i></a>
                    </span>
                    <input type="file" id="file" name="file" class="form-control" >
                </div>
            </div>
            <div class="modal-footer">
                <a href="#" class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-2" data-dismiss="modal">Annuler</a>
                <button type="submit" class="btn btn-inverse btn-outline-inverse btn-sm py-1 mx-2">Valider</button>
            </div>
        </form>
      </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(){

            $('#myTable').DataTable({
                ordering: false
            });

            $('.dataTables_length').append('<span class="my-0 mx-2"><strong class="text-danger">*</strong> Elève traduit en conseil de discipline !</span>');

            $('#modalBtn').on('click', function() {
                $('#getModal').modal("show");
            });

            $('#file').on('click', function() {
                $('#fileModal').modal("show");
            })
            
        })
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('app', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\Users\EDUCAS\Desktop\App\V4_001\resources\views\pages\conduite\index.blade.php ENDPATH**/ ?>