

<?php $__env->startSection('title','Monitoring Kehadiran'); ?>

<?php $__env->startSection('content'); ?>

<div class="container-fluid">

    
    <div class="d-flex justify-content-between align-items-center mb-4">

        <div>

            <h3 class="font-weight-bold mb-1">

                Monitoring Kehadiran

            </h3>

            <p class="text-muted mb-0">

                Monitoring aktivitas mengajar guru secara realtime.

            </p>

        </div>

        <a href="<?php echo e(url()->current()); ?>"
           class="btn btn-primary btn-modern">

            <i class="bi bi-arrow-clockwise"></i>

            Refresh

        </a>

    </div>

    
    <div class="row mb-4">

        <div class="col-md-3">

            <div class="small-card">

                <div>

                    <small>Total Jadwal</small>

                    <h3><?php echo e($jadwal->count()); ?></h3>

                </div>

                <div class="small-icon bg-primary">

                    <i class="bi bi-calendar-week"></i>

                </div>

            </div>

        </div>

        <div class="col-md-3">

            <div class="small-card">

                <div>

                    <small>Hadir</small>

                    <h3><?php echo e($jadwal->where('status','Hadir')->count()); ?></h3>

                </div>

                <div class="small-icon bg-success">

                    <i class="bi bi-person-check-fill"></i>

                </div>

            </div>

        </div>

        <div class="col-md-3">

            <div class="small-card">

                <div>

                    <small>Izin / Sakit</small>

                    <h3>

                        <?php echo e($jadwal->whereIn('status',['Izin','Sakit'])->count()); ?>


                    </h3>

                </div>

                <div class="small-icon bg-warning">

                    <i class="bi bi-exclamation-circle-fill"></i>

                </div>

            </div>

        </div>

        <div class="col-md-3">

            <div class="small-card">

                <div>

                    <small>Alpha</small>

                    <h3><?php echo e($jadwal->where('status','Alpha')->count()); ?></h3>

                </div>

                <div class="small-icon bg-danger">

                    <i class="bi bi-person-x-fill"></i>

                </div>

            </div>

        </div>

    </div>

    
    <div class="card card-modern">

        <div class="card-header bg-white border-0 d-flex justify-content-between align-items-center">

            <h5 class="mb-0">

                <i class="bi bi-table mr-2 text-primary"></i>

                Data Kehadiran Guru

            </h5>

        </div>

        <div class="card-body">

            <div class="table-responsive">

                <table class="table table-modern datatable">

                    <thead>

                    <tr>

                        <th>Guru</th>

                        <th>Mata Pelajaran</th>

                        <th>Kelas</th>

                        <th>Jam Mengajar</th>

                        <th>Status</th>

                        <th>Jam Absen</th>

                    </tr>

                    </thead>

                    <tbody>

                    <?php $__currentLoopData = $jadwal; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $j): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

                    <tr>

                        <td>

                            <strong>

                                <?php echo e($j->guru->nama); ?>


                            </strong>

                        </td>

                        <td>

                            <?php echo e($j->mataPelajaran->nama_mapel); ?>


                        </td>

                        <td>

                            <?php echo e($j->kelas->nama_kelas); ?>


                        </td>

                        <td>

                            <span class="badge badge-light">

                                <?php echo e(substr($j->jam_mulai,0,5)); ?>


                                -

                                <?php echo e(substr($j->jam_selesai,0,5)); ?>


                            </span>

                        </td>

                        <td>

                            <?php switch($j->status):

                                case ('Hadir'): ?>

                                    <span class="badge badge-success badge-pill px-3 py-2">

                                        <i class="bi bi-check-circle"></i>

                                        Hadir

                                    </span>

                                <?php break; ?>

                                <?php case ('Izin'): ?>

                                    <span class="badge badge-primary badge-pill px-3 py-2">

                                        <i class="bi bi-envelope-check"></i>

                                        Izin

                                    </span>

                                <?php break; ?>

                                <?php case ('Sakit'): ?>

                                    <span class="badge badge-warning badge-pill px-3 py-2">

                                        <i class="bi bi-heart-pulse"></i>

                                        Sakit

                                    </span>

                                <?php break; ?>

                                <?php case ('Alpha'): ?>

                                    <span class="badge badge-danger badge-pill px-3 py-2">

                                        <i class="bi bi-x-circle"></i>

                                        Alpha

                                    </span>

                                <?php break; ?>

                                <?php default: ?>

                                    <span class="badge badge-secondary badge-pill px-3 py-2">

                                        Belum Mengajar

                                    </span>

                            <?php endswitch; ?>

                        </td>

                        <td>

                            <?php echo e($j->jam_absen ?? '-'); ?>


                        </td>

                    </tr>

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

                    </tbody>

                </table>

            </div>

        </div>

    </div>

</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\Presguru\resources\views/monitoring/index.blade.php ENDPATH**/ ?>