

<?php $__env->startSection('title', 'Dashboard Checker'); ?>

<?php $__env->startSection('content_header'); ?>
    <h1><i class="fas fa-tasks mr-2"></i>Dashboard Checker</h1>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    
    <?php if(isset($iklanList) && $iklanList->count() > 0): ?>
        <div class="card card-outline card-danger mb-3">
            <div class="card-body py-2 px-3" style="overflow:hidden;white-space:nowrap;">
                <div class="d-flex align-items-center">
                    <span class="badge badge-danger mr-3" style="flex-shrink:0;"><i class="fas fa-bullhorn mr-1"></i>
                        PENGUMUMAN</span>
                    <div class="marquee-wrapper" style="overflow:hidden;flex:1;">
                        <div class="marquee-content">
                            <?php $__currentLoopData = $iklanList; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $iklan): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <span class="mr-5">
                                    <i class="fas fa-angle-double-right text-danger mr-1"></i>
                                    <strong><?php echo e($iklan->tajuk); ?></strong> — <?php echo e($iklan->kandungan); ?>

                                </span>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    <?php endif; ?>

    
    <div class="row">
        <div class="col-12">
            <div class="card card-outline card-primary">
                <div class="card-header">
                    <h3 class="card-title"><i class="fas fa-tachometer-alt mr-1"></i> Selamat Datang</h3>
                </div>
                <div class="card-body">
                    <p>Selamat datang, <strong><?php echo e(Auth::user()->name); ?></strong>.</p>
                    <p>Anda log masuk sebagai <span class="badge badge-info">Checker</span>
                        — Kod Sekolah: <span class="badge badge-primary"><?php echo e(Auth::user()->kod_sekolah ?? '-'); ?></span>
                    </p>
                </div>
            </div>
        </div>
    </div>


    
    <?php if($terkini->isNotEmpty()): ?>
        <div class="card card-outline card-warning">
            <div class="card-header">
                <h3 class="card-title"><i class="fas fa-exclamation-circle mr-1"></i> Permohonan Terkini Belum Disemak</h3>
            </div>
            <div class="card-body p-0">
                <table class="table table-hover table-striped mb-0">
                    <thead class="thead-light">
                        <tr>
                            <th>#</th>
                            <th>Nama Pemohon</th>
                            <th>Nama Sekolah</th>
                            <th class="text-center">Tarikh Hantar</th>
                            <th class="text-center">Tindakan</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $terkini; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $i => $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($i + 1); ?></td>
                                <td><?php echo e($p->user->name ?? '-'); ?></td>
                                <td><?php echo e($p->user->nama_sekolah ?? '-'); ?></td>
                                <td class="text-center">
                                    <?php echo e($p->dihantar_pada ? $p->dihantar_pada->format('d/m/Y H:i') : '-'); ?>

                                </td>
                                <td class="text-center">
                                    <a href="<?php echo e(route('checker.pengesahan.show', $p->id)); ?>" class="btn btn-sm btn-info">
                                        <i class="fas fa-eye mr-1"></i>Semak
                                    </a>
                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>
        </div>
    <?php endif; ?>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('css'); ?>
    <style>
        .marquee-wrapper {
            position: relative;
        }

        .marquee-content {
            display: inline-block;
            white-space: nowrap;
            animation: marqueeScroll 15s linear infinite;
        }

        @keyframes marqueeScroll {
            0% {
                transform: translateX(100%);
            }

            100% {
                transform: translateX(-100%);
            }
        }

        .marquee-content:hover {
            animation-play-state: paused;
        }
    </style>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('adminlte::page', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH C:\laragon\www\myspbt\resources\views/checker/dashboard.blade.php ENDPATH**/ ?>