
<?php $__env->startSection('isi'); ?>
<div class="container-fluid">
    <div class="card card-outline card-primary">
        <div class="card-header">
            <!-- <center>
                <a href="<?php echo e(url('/dokumen/tambah')); ?>" class="btn btn-primary"><i class="fa fa-plus"></i> Tambah
                    Dokumen</a>
            </center> -->
        </div>
        <!-- /.card-header -->
        <div class="card-body">
            <h1>Activity Logs</h1>

            <form action="<?php echo e(route('activity-logs.index')); ?>" method="GET" class="form-inline mb-3">
                <div class="form-group mr-2">
                    <label for="activity" class="mr-2">Activity:</label>
                    <select name="activity" id="activity" class="form-control">
                        <option value="">All</option>
                        <option value="create" <?php echo e(request()->get('activity') === 'create' ? 'selected' : ''); ?>>Create
                        </option>
                        <option value="update" <?php echo e(request()->get('activity') === 'update' ? 'selected' : ''); ?>>Update
                        </option>
                        <option value="delete" <?php echo e(request()->get('activity') === 'delete' ? 'selected' : ''); ?>>Delete
                        </option>
                    </select>
                </div>

                <div class="form-group mr-2">
                    <label for="search" class="mr-2">Search:</label>
                    <input type="text" name="search" id="search" class="form-control"
                        value="<?php echo e(request()->get('search')); ?>">
                </div>

                <button type="submit" class="btn btn-primary">Search</button>
            </form>

            <div class="table-responsive">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>User</th>
                            <th>Activity</th>
                            <th>Description</th>
                            <th>Time</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($logs->firstItem() + $loop->index); ?></td>
                            <td><?php echo e($log->user->name); ?></td>
                            <td><?php echo e(ucfirst($log->activity)); ?></td>
                            <td><?php echo e($log->description); ?></td>
                            <td><?php echo e($log->created_at); ?></td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>

            <div class="d-flex justify-content-center">
                <?php echo e($logs->appends(request()->except('page'))->links()); ?>

            </div>
        </div>
        <!-- /.card-body -->
    </div>
</div>
<br>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\16_Laravel_Absensi\absensi\resources\views/activity-logs/index.blade.php ENDPATH**/ ?>