

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

<div class="card shadow-sm">

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

        <h4 class="mb-0">
            Pengajuan Izin & Sakit
        </h4>

        <a href="/izin/create"
           class="btn btn-primary">

            <i class="fas fa-plus"></i>
            Ajukan Izin

        </a>

    </div>

    <div class="card-body">

        <?php if(session('success')): ?>

        <div class="alert alert-success">

            <?php echo e(session('success')); ?>


        </div>

        <?php endif; ?>

        <?php if($izin->count()): ?>

        <div class="table-responsive">

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

                <thead class="table-light">

                    <tr>

                        <th width="150">
                            Tanggal
                        </th>

                        <th width="120">
                            Jenis
                        </th>

                        <th>
                            Alasan
                        </th>

                        <th width="180">
                            Dibuat
                        </th>

                    </tr>

                </thead>

                <tbody>

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

                    <tr>

                        <td>
                            <?php echo e(date('d-m-Y', strtotime($i->tanggal))); ?>

                        </td>

                        <td>

                            <?php if($i->jenis == 'Sakit'): ?>

                                <span class="badge bg-danger">
                                    Sakit
                                </span>

                            <?php else: ?>

                                <span class="badge bg-warning text-dark">
                                    Izin
                                </span>

                            <?php endif; ?>

                        </td>

                        <td>

                            <?php echo e($i->alasan); ?>


                        </td>

                        <td>

                            <?php echo e($i->created_at->format('d-m-Y H:i')); ?>


                        </td>

                    </tr>

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

                </tbody>

            </table>

        </div>

        <?php else: ?>

        <div class="alert alert-info">

            Belum ada pengajuan izin.

        </div>

        <?php endif; ?>

    </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/izin/index.blade.php ENDPATH**/ ?>