

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

<div class="card shadow-sm border-0">

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

            <h4 class="mb-0">
                <i class="fas fa-history text-primary"></i>
                Riwayat Absensi
            </h4>

            <span class="badge badge-primary p-2">
                Total Data : <?php echo e($absensi->count()); ?>

            </span>

        </div>
    </div>

    <div class="card-body">

        <form method="GET"
              action="/absensi/riwayat">

            <div class="row">

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

                    <label>Filter Bulan</label>

                    <input type="month"
                           name="bulan"
                           value="<?php echo e(request('bulan')); ?>"
                           class="form-control">

                </div>

                <div class="col-md-2 d-flex align-items-end">

                    <button class="btn btn-primary btn-block">
                        <i class="fas fa-search"></i>
                        Filter
                    </button>

                </div>

            </div>

        </form>

        <hr>

        <div class="table-responsive">

            <table class="table table-hover table-bordered datatable">

                <thead class="bg-light">

                    <tr>
                        <th width="150">Tanggal</th>
                        <th width="120">Jam Kerja</th>
                        <th width="120">Status</th>
                    </tr>

                </thead>

                <tbody>

                <?php $__empty_1 = true; $__currentLoopData = $absensi; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>

                    <tr>

                        <td>
                            <i class="far fa-calendar-alt text-primary"></i>
                            <?php echo e(\Carbon\Carbon::parse($a->tanggal)->format('d-m-Y')); ?>

                        </td>


                        <td>
                            <span class="badge badge-info">
                                <?php echo e($a->jam_kerja); ?> Jam
                            </span>
                        </td>

                        <td>

                            <?php if($a->status == 'Hadir'): ?>
                                <span class="badge badge-success">
                                    Hadir
                                </span>

                            <?php elseif($a->status == 'Izin'): ?>
                                <span class="badge badge-warning">
                                    Izin
                                </span>

                            <?php elseif($a->status == 'Sakit'): ?>
                                <span class="badge badge-info">
                                    Sakit
                                </span>

                            <?php else: ?>
                                <span class="badge badge-danger">
                                    Alpha
                                </span>
                            <?php endif; ?>

                        </td>

                    </tr>

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

                    <tr>
                        <td colspan="5" class="text-center">

                            <div class="py-4">

                                <i class="fas fa-calendar-times fa-3x text-muted"></i>

                                <br><br>

                                Tidak ada data absensi

                            </div>

                        </td>
                    </tr>

                <?php endif; ?>

                </tbody>

            </table>

        </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\sistem-gaji-sekolah\resources\views/absensi/riwayat.blade.php ENDPATH**/ ?>