<?php $__env->startSection('contenu'); ?>
    <section
        style="background-image: url('/img/login.png'); background-attachment: fixed; background-repeat: no-repeat; background-size: cover; min-height: 93.2vh"
        class="section">
        <section class="section is-link is-light">
            <h1 class="title is-1 is-size-3-touch has-text-centered has-text-white"> Bienvenue sur UpSchool </h1>
            <h1 class="subtitle is-6 has-text-centered has-text-white"> Une meilleure vision de l'éducation</h1>
        </section>

        <!-- LES CLASSES =============================================================  -->

        <section>
            <!-- Ajouter classe ======================================================= -->

            <?php echo $__env->make('/partials/modalClasse', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <?php echo $__env->make('/partials/modalModifierClasse', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

            <!-- Supprimer classe -->
            <?php echo $__env->make('/partials/modalConfirmSuppClasse', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

            <?php echo $__env->make('/partials/modalDetailsOperation', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <?php echo $__env->make('/partials/modalAjouterOperation', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <?php echo $__env->make('/partials/modalModifierOperation', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
            <?php echo $__env->make('/partials/modalConfirmSuppOperation', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

            <!-- end =================================================================== -->

            <!-- Panel ================================================================= -->

            <div class="columns mx-0">
                <div class="column mr-1 mt-2 mb-0 is-half box">
                    <canvas id="myChartPrimaire"></canvas>
                </div>
                <div class="column mt-2 is-half box">
                    <canvas id="myChartSecondaire"></canvas>
                </div>
            </div>

            <div class="columns mx-0 mt-6">
                <div class="column p-5-desktop mx-3-desktop mx-0-mobile p-0-mobile">
                    <article class="panel has-background-white">
                        <p class="panel-heading">
                            Classes
                        </p>
                        <?php if(auth()->user()->administrateur == 1): ?>
                            <div class="panel-block is-justify-content-center">
                                <div>
                                    <a onclick="openForm('modalFormClasse')" class="button is-info is-rounded">
                                        <strong>Ajouter une classe</strong>
                                    </a>
                                </div>
                            </div>
                        <?php endif; ?>
                        <div style="height: 20rem; overflow-y: auto;">
                            <?php if(auth()->user()->role == 'administration' || auth()->user()->role == 'surveillant'): ?>
                                <?php $__currentLoopData = $classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $classe): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <div class="columns is-flex mx-0">
                                        <div class="column p-0 pt-4 is-three-quarters">
                                            <a href="/accueil/classe/<?php echo e($classe->slug); ?>" class="panel-block">
                                                <span class="panel-icon">
                                                    <i class="fas fa-graduation-cap" aria-hidden="true"></i>
                                                </span>
                                                <?php echo e($classe->libelle); ?>

                                            </a>
                                        </div>
                                        <?php if(auth()->user()->administrateur == 1): ?>
                                            <div class="column p-0 pt-4 is-flex is-justify-content-right">
                                                <a style="color: #3E8ED0" title="Modifier"
                                                    class="icon is-medium btn_modifier_classe"
                                                    onclick="openForm('modal_modifier_classe'); get_libelle_classe('<?php echo e($classe->libelle); ?>'); get_id_classe(<?php echo e($classe->id); ?>); get_type_classe('<?php echo e($classe->type); ?>')">
                                                    <i class="fas fa-edit" aria-hidden="true"></i>
                                                </a>
                                                <a style="color: #3E8ED0" title="Supprimer" class="icon is-medium"
                                                    onclick="get_id_classe(<?php echo e($classe->id); ?>); openForm('modalSuppClasse');">
                                                    <i class="fas fa-trash-alt" aria-hidden="true"></i>
                                                </a>
                                            </div>
                                        <?php endif; ?>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php elseif(auth()->user()->role == 'professeur'): ?>
                                <?php $__currentLoopData = $professeurs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $professeur): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <?php if(str_replace(' ', '', $professeur->telephone) == auth()->user()->nom_utilisateur): ?>
                                        <?php $__currentLoopData = $professeur->classes; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $classe): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <div class="columns is-flex mx-0">
                                                <div class="column p-0 pt-4 is-three-quarters">
                                                    <a href="/accueil/classe/<?php echo e($classe->slug); ?>" class="panel-block">
                                                        <span class="panel-icon">
                                                            <i class="fas fa-graduation-cap" aria-hidden="true"></i>
                                                        </span>
                                                        <?php echo e($classe->libelle); ?>

                                                    </a>
                                                </div>
                                            </div>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php endif; ?>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                            <?php endif; ?>
                        </div>
                    </article>
                </div>
                <?php if(auth()->user()->role == 'administration'): ?>
                    <div class="column p-5-desktop mx-3-desktop mx-0-mobile p-0-mobile">
                        <article class="panel is-info has-background-white">
                            <p class="panel-heading">
                                Transactions
                            </p>
                            <div class="panel-block is-justify-content-center">
                                <div>
                                    <a onclick="openForm('modalAjouterOperation')" class="button is-info is-rounded">
                                        <strong>Ajouter transaction</strong>
                                    </a>
                                </div>
                            </div>
                            <div style="height: 20rem;overflow-y: auto;">
                                <?php if(auth()->user()->administrateur == 1): ?>
                                    <?php if(count($operations) == 0): ?>
                                        <div class="panel-block is-justify-content-center">
                                            <strong>Aucune Transaction</strong>
                                        </div>
                                    <?php else: ?>
                                        <?php $__currentLoopData = $operations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $operation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <span class="columns is-flex m-auto">
                                                <span class="column is-three-quarters">
                                                    <span class="panel-block">
                                                        <span class="panel-icon">
                                                            <i class="fas fa-money-bill" aria-hidden="true"></i>
                                                        </span>
                                                        <?php echo e($operation->libelle); ?>(<?php echo e($operation->type_operation); ?>) par
                                                        <?php echo e($operation->user != null ? $operation->user->prenom . ' ' . $operation->user->nom : 'UPGROUP-PAY'); ?>

                                                        <?php echo e($operation->statut == 'annule' ? ' (Annulee)' : ''); ?>

                                                    </span>
                                                </span>
                                                <span class="column px-0 is-flex is-justify-content-right">
                                                    <a class="icon is-medium"
                                                        onclick="openForm('modalDetailsOperation'); get_ref_det('<?php echo e($operation->reference); ?>'); get_libelle_det('<?php echo e(addslashes($operation->libelle)); ?>'); get_type_det('<?php echo e($operation->type_operation); ?>'); get_descr_det('<?php echo e(addslashes($operation->description == null ? '' : $operation->description)); ?>'); get_montant_det('<?php echo e($operation->montant); ?>'); get_author_det('<?php echo e($operation->user != null ? $operation->user->prenom . ' ' . $operation->user->nom : 'UPGROUP-PAY'); ?>'); get_date_det('<?php echo e(date('d/m/Y', strtotime($operation->created_at))); ?>'); get_update_det('<?php echo e(date('d/m/Y', strtotime($operation->updated_at))); ?>');">
                                                        <i title="Détails" class="fas fa-info" aria-hidden="true"></i>
                                                    </a>
                                                    <a class="icon is-medium"
                                                        onclick="openForm('modalModifierOperation'); get_id_operation(<?php echo e($operation->id); ?>); get_libelle_operation('<?php echo e(addslashes($operation->libelle)); ?>'); get_type_operation('<?php echo e($operation->type_operation); ?>'); get_descr('<?php echo e(addslashes($operation->description == null ? '' : $operation->description)); ?>'); get_montant('<?php echo e($operation->montant); ?>');">
                                                        <i title="Modifier" class="fas fa-edit" aria-hidden="true"></i>
                                                    </a>
                                                    <a class="icon is-medium"
                                                        onclick="get_id_operation(<?php echo e($operation->id); ?>); openForm('modalSuppOperation')">
                                                        <i title="Supprimer" class="fas fa-trash-alt"
                                                            aria-hidden="true"></i>
                                                    </a>
                                                </span>
                                            </span>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php endif; ?>
                                <?php else: ?>
                                    <?php $__currentLoopData = $userOperations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $operation): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <span class="columns is-flex m-auto">
                                            <span class="column is-three-quarters">
                                                <span class="panel-block">
                                                    <span class="panel-icon">
                                                        <i class="fas fa-money-bill" aria-hidden="true"></i>
                                                    </span>
                                                    <?php echo e($operation->libelle); ?>(<?php echo e($operation->type_operation); ?>)
                                                    <?php echo e($operation->statut == 'annule' ? ' (Annulee)' : ''); ?>

                                                </span>
                                            </span>
                                            <span class="column px-2 is-flex is-justify-content-right">
                                                <a class="icon is-medium"
                                                    onclick="openForm('modalDetailsOperation'); get_ref_det('<?php echo e($operation->reference); ?>'); get_libelle_det('<?php echo e(addslashes($operation->libelle)); ?>'); get_type_det('<?php echo e($operation->type_operation); ?>'); get_descr_det('<?php echo e(addslashes($operation->description == null ? '' : $operation->description)); ?>'); get_montant_det('<?php echo e($operation->montant); ?>'); get_author_det('<?php echo e($operation->user != null ? $operation->user->prenom . ' ' . $operation->user->nom : 'UPGROUP-PAY'); ?>'); get_date_det('<?php echo e(date('d/m/Y', strtotime($operation->created_at))); ?>'); get_update_det('<?php echo e(date('d/m/Y', strtotime($operation->updated_at))); ?>');">
                                                    <i title="Détails" class="fas fa-info" aria-hidden="true"></i>
                                                </a>
                                            </span>
                                        </span>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>
                            </div>
                        </article>
                    </div>
                    <?php if(auth()->user()->role == 'administration'): ?>
                        <div class="column p-5-desktop mx-3-desktop mx-0-mobile p-0-mobile">
                            <article class="panel has-background-white">
                                <p class="panel-heading">
                                    Actions
                                </p>
                                <div class="panel-block is-justify-content-center">
                                    <div>
                                        <a style="cursor: grab" class="button is-white is-rounded">
                                            <strong>Les dernières actions</strong>
                                        </a>
                                    </div>
                                </div>
                                <div style="height: 20rem;overflow-y: auto;">
                                    <?php if(count($notifications) == 0): ?>
                                        <div class="panel-block is-justify-content-center">
                                            <strong>Aucune Action</strong>
                                        </div>
                                    <?php else: ?>
                                        <?php $__currentLoopData = $notifications; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $notification): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <span class="panel-block">
                                                <span class="panel-icon">
                                                    <i class="fas fa-bell" aria-hidden="true"></i>
                                                </span>
                                                <span class="subtitle is-6"><?php echo e($notification->message); ?> le
                                                    <?php echo e(date('d-m-Y', strtotime($notification->date))); ?></span>
                                            </span>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php endif; ?>
                                </div>
                            </article>
                        </div>
                    <?php endif; ?>
                <?php endif; ?>
            </div>
        </section>
    </section>
    <!-- End panel ============================================================= -->
    <?php echo $__env->make('/partials/homeJs', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <?php echo $__env->make('/partials/operationJs', \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/accueil.blade.php ENDPATH**/ ?>