
<?php $__env->startSection('content'); ?>
    <!-- begin::main content -->
    <main class="main-content">
        <div class="container">
            <!-- begin::page header -->
            <div class="page-header">
                <h3>Visitor Entry List</h3>
                <nav aria-label="breadcrumb">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="<?php echo e(asset('dashboard')); ?>"><?php echo e(__('message.dashboard')); ?></a></li>
                        <li class="breadcrumb-item active" aria-current="page"><?php echo e(__('message.list')); ?></li>
                    </ol>
                </nav>
            </div>
            <!-- end::page header -->
            <div class="card">

                <div class="card-header">
                    <form action="filter-visitor-entry" method="post">
                        <?php echo csrf_field(); ?>
                        <div class="row justify-content-between">

                            <div class="col-md-2">
                                <select class="form-control" name="per_page" id="per_page">
                                    <option value="25">25</option>
                                    <option value="50">50</option>
                                    <option value="100">100</option>
                                    <option  value="200">200</option>
                                </select>
                            </div>
                            <div class="col-md-3">
                                <input placeholder="Date range filter" type="date" name="date" class="form-control" value="<?php echo e($current_date); ?>">
                            </div>
                            

                            <div class="col-md-3">
                                <button data-toggle="tooltip" data-original-title="Search" type="submit"
                                    class="btn m-r-10 btn-primary pull-left"><i class="fa fa-search fa-lg"></i>
                                </button>
                                <a data-toggle="tooltip" data-original-title="Reset Filters"
                                    href="<?php echo e(asset('/visitor-entry-list')); ?>" class="btn m-r-10 btn-warning pull-left text-white">
                                    <i class="fa fa-refresh fa-lg"></i>
                                </a>
                                
                            </div>
                        </div>
                    </form>
                </div>

                <div class="card-body">

                    <?php if(isset($visitorentry)): ?>

                        <div class="table-responsive">
                            <table class="table table-striped table-bordered">
                                <thead>
                                    <tr>
                                        <th>
                                            <input type="checkbox" id="checkAll" />
                                        </th>
                                        <th>S.No</th>
                                        <th>Image</th>
                                        <th>Name</th>
                                        <th>Gender</th>
                                        <th>ID</th>
                                        <th>Time In</th>
                                        <th>Time Out</th>
                                        
                                        <th>Purpose</th>
                                        <th>Organization</th>
                                        <th>Designation</th>
                                        <th>Mobile</th>
                                        <th>Address</th>
                                        <th>City</th>
                                        
                                        <th>Contact No</th>
                                        
                                        <th>Action</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php if(!empty($visitorentry)): ?>
                                        <?php $__currentLoopData = $visitorentry; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                           <tr>
                                                <td>
                                                    <input type="checkbox" id="checkAll" />
                                                </td>
                                                <td><?php echo e(++$key); ?></td>
                                                <td>
                                                    <img class="rounded-circle" src="<?php echo e($value->profile_pic!=null ? asset('public'.$value->profile_pic) : asset('public/avtar.png')); ?>" alt="visitor" width="40" height="40">
                                                </td>
                                                <td class="text-capitalize"><?php echo e($value->visitor_name); ?></td>
                                                <td><?php echo e($value->gender); ?></td>
                                                <td>
                                                    <span class="text-capitalize"><?php echo e($value->id_type); ?> : <strong><?php echo e($value->id_number); ?></strong></span>
                                                </td>
                                                <td>
                                                    <span class="btn btn-info">
                                                        <?php echo e(date('h:i A', strtotime($value->check_in_time))); ?>

                                                    </span>
                                                </td>
                                                <td>
                                                    <span class="btn btn-info">
                                                        <?php echo e(date('h:i A', strtotime($value->check_out_time))); ?>

                                                    </span>
                                                </td>
                                                
                                                <td>
                                                    <button class="btn btn-info purpose-btn" purpose="<?php echo e($value); ?>">
                                                        <i class="fa fa-eye"></i>
                                                    </button>
                                                </td>
                                                <td><?php echo e($value->organization); ?></td>
                                                <td><?php echo e($value->designation); ?></td>
                                                <td><?php echo e($value->visitor_mobile); ?></td>
                                                <td><?php echo e($value->address); ?></td>
                                                <td><?php echo e($value->city); ?></td>
                                                
                                                <td><?php echo e($value->contact_no); ?></td>
                                                <td>
                                                <div class="btn-group">
                                                       
                                                        <a class="btn btn-sm btn-danger text-white" data-toggle="tooltip"
                                                            data-original-title="User Info"
                                                            href="<?php echo e(asset('visitor-entry-delete/'.$value->id)); ?>"><i
                                                                class="fa fa-trash fa-lg"></i>
                                                        </a>
                                                        
                                                    </div>
                                                </td>
                                           </tr>
                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                    <?php else: ?>
                                        <h1>No Record Found!!</h1>
                                    <?php endif; ?>
                                </tbody>
                            </table>
                        </div>


                        
                    <?php endif; ?>
                </div>
            </div>
        </div>

        
        <!-- Button to Open the Modal -->


<!-- The Modal -->
<div class="modal" id="purposeModal">
  <div class="modal-dialog modal-lg">
    <div class="modal-content ">

      <!-- Modal Header -->
      <div class="modal-header">
        <h4 class="modal-title">Purpose Of Meeting</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>

      <!-- Modal body -->
      <div class="modal-body">
        <div class="row">
            <div class="col-md-6">
                <p>Host Name : <strong>Ravi Kumar</strong></p>
                <p>Orgnisation : <strong>Edukrypt Corporation PVT LTD</strong></p>
                <p>Designation : <strong>Accountant</strong></p>
                <p>Employee Code : <strong>2365</strong></p>
                <p>Mobile : <strong>+91 9856985688</strong></p>
            </div>
            <div class="col-md-6">
                <h4>Purpose Of Meeting</h4>
                <hr>
                <p>
                Lorem ipsum is placeholder text commonly used in the graphic, print, and publishing industries for previewing layouts and visual mockups.
                </p>
            </div>
        </div>
         
      </div>
    </div>
  </div>
</div>
    </main>
    <!-- end::main content -->
<?php $__env->stopSection(); ?>
<?php $__env->startPush('footer-script'); ?>
    <!-- begin::dataTable -->
    <script src="<?php echo e(asset('public/admin/js/examples/datatable.js')); ?>"></script>
    <!-- end::dataTable -->
    <script>
        $(document).ready(function() {
            $("#checkAll").click(function() {
                $('input:checkbox').not(this).prop('checked', this.checked);
            });
            /*
            $('#deleteAll').click(function() {
                if (confirm("Are you sure you want to delete Users? ")) {
                    var val = [];
                    $('.deleteall:checked').each(function(i) {
                        val[i] = $(this).val();
                    });

                    if (val.length > 0) {
                        $.ajax({
                            method: "POST",
                            headers: {
                                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                            },
                            url: "<?php echo e(asset('delete-multiple-users')); ?>",
                            data: {
                                "ids": val
                            }
                        }).done(function(data) {
                            if (data) {
                                location.reload();
                            } else {
                                alert("Something went wrong!, Try again");
                            }
                        });
                    }
                }
                //alert(<?php echo e(asset('admin/delete-multiple-users')); ?>);
            });*/
           
            $(".purpose-btn").click(function(){
                
                $("#purposeModal").modal();
            });
            
        });
    </script>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\xampp\htdocs\visitor_management\resources\views/visitor/visitor-entry-list.blade.php ENDPATH**/ ?>