<?php $__env->startSection('contenu'); ?>
    <?php echo $__env->make('/partials/modalCours', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/modalNotes', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/modalBulletin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/modalFacture', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/modalClassPromos', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/modalRapportPaiement', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <section
        style="background-image: url('/img/bgclasse.png'); background-attachment: fixed; background-repeat: no-repeat; background-size: cover; min-height: 93.2vh"
        class="section p-0 mt-0 columns mx-0 mb-0 is-centered">
        <section class="section container column is-two-thirds">
            <section class="section is-link is-light p-0">
                <h1 class="title is-1 is-size-3-touch has-text-centered has-text-white"><?php echo e($classe->libelle); ?></h1>
                <h1 class="subtitle is-6 has-text-centered has-text-white"><?php echo e($classe->type); ?></h1>
            </section>
            <section class="info-tiles">
                <div
                    class="has-text-centered is-flex is-justify-content-center is-justify-content-space-around is-flex-wrap-wrap">
                    <a onclick="openForm('modal_cours')" class="button is-info is-rounded mb-3">
                        <span>Remplir cahier de texte</span>
                    </a>
                    <a href="/accueil/classe/<?php echo e($classe->slug); ?>/coursHistory" class="button is-info is-rounded mb-3">
                        <span>Historique des cours</span>
                    </a>
                    <a href="/accueil/classe/<?php echo e($classe->slug); ?>/evaluationHistory" class="button is-info is-rounded mb-3">
                        <span>Historique des évaluations</span>
                    </a>
                    <a onclick="get_classe_slug('<?php echo e($classe->slug); ?>') ; openForm('modal_notes')"
                        class="button is-info is-rounded mb-3">
                        <span>Enregistrer des notes</span>
                    </a>
                </div>
                <div class="tile is-ancestor has-text-centered">
                    <div class="tile is-parent">
                        <article class="tile is-child box">
                            <p class="title is-4">Effectif</p>
                            <p class="subtitle"><?php echo e($classe->effectif); ?></p>
                        </article>
                    </div>
                    <div class="tile is-parent">
                        <article class="tile is-child box">
                            <p class="title is-4">Evaluations</p>
                            <p class="subtitle">
                                <?php echo e(count($classe->evaluations->where('promo', auth()->user()->current_year))); ?></p>
                        </article>
                    </div>
                    <div class="tile is-parent">
                        <article class="tile is-child box">
                            <p class="title is-4">Moyenne</p>
                            <p class="subtitle"><?php echo e(round($moyenneClasse, 2)); ?></p>
                        </article>
                    </div>
                </div>
            </section>
            <div class="box is-flex is-justify-content-center is-justify-content-space-around is-flex-wrap-wrap">
                <?php if($evaluations1->count() != 0): ?>
                    <div class="box mb-4">
                        <canvas id="chartClasse1"></canvas>
                    </div>
                <?php endif; ?>
                <?php if($evaluations2->count() != 0): ?>
                    <div class="box mb-4">
                        <canvas id="chartClasse2"></canvas>
                    </div>
                <?php endif; ?>
                <?php if($evaluations3->count() != 0): ?>
                    <div class="box mb-4">
                        <canvas id="chartClasse3"></canvas>
                    </div>
                <?php endif; ?>
            </div>
            <nav class="panel is-info has-background-light">
                <p class="panel-heading">
                    Liste des élèves
                </p>
                <?php if(auth()->user()->role == 'administration' || auth()->user()->role == 'surveillant'): ?>
                    <div
                        class="has-text-centered is-flex is-justify-content-center is-justify-content-space-around is-flex-wrap-wrap">
                        <div class="panel-block columns mx-0 is-centered my-1">
                            <button class="button is-rounded is-info" onclick="openForm('modalBulletin')">
                                <span class="icon">
                                    <i class="fas fa-clipboard"></i>
                                </span>
                                <span>Bulletins</span>
                            </button>
                        </div>
                        <?php if(auth()->user()->role == 'administration'): ?>
                            <div class="panel-block columns mx-0 is-centered my-1">
                                <button class="button is-rounded is-info" onclick="openForm('modal_facture')">
                                    <span class="icon">
                                        <i class="fas fa-solid fa-file-invoice-dollar"></i>
                                    </span>
                                    <span>Factures</span>
                                </button>
                            </div>
                        <?php endif; ?>
                        <?php if(auth()->user()->role == 'administration'): ?>
                            <div class="panel-block columns mx-0 is-centered my-1">
                                <button class="button is-rounded is-info" onclick="openForm('modal_rapport_paiement')">
                                    <span class="icon">
                                        <i class="fas fa-solid fa-receipt"></i>
                                    </span>
                                    <span>Rapport</span>
                                </button>
                            </div>
                        <?php endif; ?>
                        <div class="panel-block columns mx-0 is-centered my-1">
                            <button class="button is-rounded is-info" onclick="openForm('modalClassPromos')">
                                <span class="icon">
                                    <i class="fas fa-solid fa-graduation-cap"></i>
                                </span>
                                <span>Promos</span>
                            </button>
                        </div>
                    </div>
                <?php endif; ?>
                <?php if(count($classe->eleves) == 0): ?>
                    <p class="title is-6 has-text-centered pb-4">Aucun élève n'est inscrit dans cette classe</p>
                <?php else: ?>
                    <?php $__currentLoopData = $classe->eleves->where('promo', auth()->user()->current_year)->sortBy('nom'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $eleve): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <div class="columns mx-0 px-2 is-flex is-flex-wrap-nowrap">
                            <div class="column is-narrow">
                                <a href="/accueil/classe/<?php echo e($classe->slug); ?>/eleve/<?php echo e($eleve->slug); ?>" class="panel-block">
                                    <span class="panel-icon">
                                        <i class="fas fa-user-graduate" aria-hidden="true"></i>
                                    </span>
                                    <?php echo e($eleve->prenom); ?> <?php echo e($eleve->nom); ?>

                                </a>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php endif; ?>
            </nav>
        </section>
    </section>
    <?php echo $__env->make('/partials/coursJs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/classeJs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/facturesJs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/notesJs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/rapportPaiementJs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/dide1435/luqman.upschool-sn.com/resources/views/classe.blade.php ENDPATH**/ ?>