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

<div class="card mb-3">
  <div class="card-body pt-0">
    <div class="row">

      <!-- Search by Date -->
      <div class="col-lg-6 pt-3 pt-lg-0">
        <h6>Search Logs Per Date</h6>

        <form class="form-material" method="POST" action="<?php echo e(url('/user-logs/search-date')); ?>">
          <?php echo csrf_field(); ?>

          Start Date:
          <input type="date" value="<?php echo e(date('Y-m-d')); ?>" required class="form-control" name="date1"><br>

          End Date:
          <input type="date" value="<?php echo e(date('Y-m-d')); ?>" required class="form-control" name="date2">
          <br>

          <button type="submit" class="btn btn-primary btn-sm">
            <i class="fas fa-search"></i> Preview
          </button>
        </form>
      </div>

    </div>
  </div>
</div>

<div class="card mb-3">
  <div class="card-body pt-0">

    <h5 class="mb-0">User Activity Logs</h5>
    <p>Displaying <?php echo e($logs->count()); ?> of <?php echo e($logs->total()); ?> logs</p>

    <div class="dt-responsive table-sm table-responsive">
      <table id="basic-btn" class="table table-sm table-striped table-bordered nowrap">
        <thead class="bg-200 text-900">
          <tr>
            <th>#</th>
            <th>User</th>
            <th>Action</th>
            <th>Date</th>
          </tr>
        </thead>

        <tbody>
          <?php $__empty_1 = true; $__currentLoopData = $logs; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $log): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
            <tr>
              <td><?php echo e($log->id); ?></td>
              <td><?php echo e($log->user->name ?? 'System'); ?></td>
              <td><?php echo e($log->action); ?></td>
              <td><?php echo e($log->created_at->format('Y-m-d H:i')); ?></td>
            </tr>
          <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
            <tr>
              <td colspan="6" class="text-center">No logs found</td>
            </tr>
          <?php endif; ?>
        </tbody>
      </table>
    </div>
  </div>
</div>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\WORK-STATION\MBBS\Insurance-Version Controls\03-01-2026\resources\views/logs/index.blade.php ENDPATH**/ ?>