

<?php $__env->startSection('title'); ?>
Activity Log 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('breadcrumb'); ?>
<ol class="breadcrumb pull-right">
        <li><a href="<?php echo e(route('home')); ?>"><i class="fa fa-dashboard"></i> Home</a></li>

        <li class="active">Activity Log</li>
      </ol>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>


            <div class="container-fluid">
                <!-- /row -->
                <div class="row">
                    <div class="col-sm-12">
                        <div class="white-box">
                            <div class="pull-right">
                                <!-- <a href="<?php echo e(route('customer.addView')); ?>" class="btn  btn-primary">
                                    <i class="fa fa-plus-square"></i>&nbsp; Add new Customer
                                </a> -->
                            </div>
                            <h3 class="box-title">All Recent Activities</h3>
                            <form method="GET" action="<?php echo e(route('user.log')); ?>">
                                <div class="row">

                                <div class="col-sm-3">
                                <label style="font-weight: 700;">By User<span style="color: red;">*</span></label>
                                <select class="form-control chosen-select" id="user" name="user" required>
                                 <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <option value="<?php echo e($user->id); ?>"><?php echo e($user->name); ?></option>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </select>
                                </div>


                                <div class="col-sm-5">
                                <div class="row">

                                <div class="col-sm-6">
                                <label style="font-weight: 700;">From<span style="color: red;">*</span></label>
                                <input type="date"  class="form-control" name="from" id="from" required>
                                </div>

                                <div class="col-sm-6">
                                <label style="font-weight: 700;">To<span style="color: red;">*</span></label>
                                <input type="date"  class="form-control" value="<?php echo e(date('Y-m-d')); ?>" name="to" id="to" required>
                                </div>

                                </div>
                                </div>

                                <div class="col-sm-2" style="margin-top: 2.5rem;">
                                <button type="submit" class="btn btn-success">Filter</button>
                                </div>

                                </div>
                                </form>
                            <div class="table-responsive">
                                
                                <table id="myTable" class="table table-striped">
                                    <thead>
                                        <tr>
                                            <th>#</th>
                                            <th>Action</th>
                                            <th>Description</th>
<!--                                            <th>S/O</th>-->
                                            <th>User</th>

                                            <th>Time</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php $count =1;?>
                                        <?php $__currentLoopData = $activity; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $a): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                        <tr>
                                            <td><?php echo e($count++); ?></td>
                                             <td><?php echo e($a->log_name); ?>

                                             </td>
                                            <td><?php echo e($a->description); ?></td>
                                            <?php if($a->user): ?>
                                            <td><?php echo e($a->user->name); ?></td>
                                            <?php else: ?>
                                            <td></td>
                                            <?php endif; ?>


                                            <td><?php echo e($a->created_at); ?></td>
                                           
                                        </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                    </tbody>
                                </table>
                                <div style="float: right;">
                                 
                                 <?php echo e($activity->appends(request()->input())->links()); ?>

                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- /.row -->
              </div>
            <!-- /.container-fluid -->

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

<?php $__env->startSection('js'); ?>
<script>
    $(function() {
        $('#myTable').DataTable({
            'pageLength':50,
            'paging':false,
            'info':false
        });

});
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app' , \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\akram-city.projecterp.net\resources\views/activity.blade.php ENDPATH**/ ?>