

<?php $__env->startSection('title','Data Guru'); ?>

<?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">
                Data Guru
            </h3>

            <p class="text-muted mb-0">
                Kelola seluruh data guru yang terdaftar pada sistem.
            </p>
        </div>

        <a href="<?php echo e(route('guru.create')); ?>" class="btn btn-primary btn-modern">
            <i class="bi bi-plus-circle mr-1"></i>
            Tambah Guru
        </a>

    </div>

    
    <div class="row mb-4">

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

            <div class="small-card">

                <div>

                    <small>Total Guru</small>

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

                </div>

                <div class="small-icon bg-primary">
                    <i class="bi bi-mortarboard-fill"></i>
                </div>

            </div>

        </div>

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

            <div class="small-card">

                <div>

                    <small>Guru Tetap</small>

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

                </div>

                <div class="small-icon bg-success">
                    <i class="bi bi-person-check-fill"></i>
                </div>

            </div>

        </div>

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

            <div class="small-card">

                <div>

                    <small>Guru Honorer</small>

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

                </div>

                <div class="small-icon bg-warning">
                    <i class="bi bi-people-fill"></i>
                </div>

            </div>

        </div>

    </div>

    
    <div class="card card-modern">

        <div class="card-header bg-white border-0">

            <h5 class="mb-0">

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

                Daftar Guru

            </h5>

        </div>

        <div class="card-body">

            <div class="table-responsive">

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

                    <thead>

                        <tr>

                            <th>NIP</th>

                            <th>Nama Guru</th>

                            <th>Status</th>

                            <th>Tarif / Jam</th>

                            <th class="text-center" width="150">
                                Aksi
                            </th>

                        </tr>

                    </thead>

                    <tbody>

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

                        <tr>

                            <td>

                                <strong><?php echo e($g->nip); ?></strong>

                            </td>

                            <td>

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


                            </td>

                            <td>

                                <?php if($g->status=="Tetap"): ?>

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

                                <?php else: ?>

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

                                <?php endif; ?>

                            </td>

                            <td>

                                Rp <?php echo e(number_format($g->tarif_per_jam,0,',','.')); ?>


                            </td>

                            <td class="text-center">

                                <a href="<?php echo e(route('guru.edit',$g->id)); ?>"
                                   class="btn btn-warning btn-sm rounded-circle">

                                    <i class="bi bi-pencil"></i>

                                </a>

                                <form action="<?php echo e(route('guru.destroy',$g->id)); ?>"
                                      method="POST"
                                      class="d-inline">

                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('DELETE'); ?>

                                    <button
                                        onclick="return confirm('Hapus data guru ini?')"
                                        class="btn btn-danger btn-sm rounded-circle">

                                        <i class="bi bi-trash"></i>

                                    </button>

                                </form>

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