<?php $__env->startSection('content'); ?>
  <article class="content items-list-page">
                    <div class="title-search-block">
               
                        <div class="title-block">
                            <div class="row">
                                <div class="col-md-6">
                                    <h3 class="title">
                    Guest Log <button type="button" class="btn btn-primary btn-sm rounded-s btn-pill-right" data-toggle="modal" data-target="#myModal"><i class="fa fa-location-arrow"></i> New Entry </button>
                    <!--<a href="<?php echo e(url('admin/emp/create')); ?>" class="btn btn-primary btn-sm rounded-s">
                        <i class="fa fa-location-arrow"></i> New Appointment
                    </a> -->
                    
              <!--  <div class="action dropdown">
                        <button class="btn  btn-sm rounded-s btn-secondary dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            Reports
                        </button>
                        <div class="dropdown-menu" aria-labelledby="dropdownMenu1">
                            <a class="dropdown-item" href="#">
                                <i class="fa fa-file-text icon"></i> Employee Log Report</a>
                        </div>
                    </div>  -->
                </h3>
                                    <p class="title-description"> 
        <ul class='breadcrumb'>
        <li><a href="<?php echo e(URL('admin/dashboard')); ?>"><i class="fa fa-home"></i> Dashboard</a></li>
        <li>Guest Logs</li>

    </ul>
</p>
                                </div>
                            </div>
                        </div>
                        <div class="items-search">
                            <form class="form-inline" role="form" enctype="multipart/form-data" method="POST" action="<?php echo e(url('/admin/guest/search')); ?>">
                        <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                            <!--<form class="form-inline"> -->
                                <div class="input-group"> <input type="text" name="query" class="form-control boxed rounded-s" placeholder="Search for guest Name"> <span class="input-group-btn">
                    <button class="btn btn-secondary rounded-s" type="submit">
                        <i class="fa fa-search"></i>
                    </button>
                </span> </div>
                            </form>
                        </div>
                    </div>
 <?php if(count($errors) > 0): ?>
                        <div class="alert alert-danger">
                            <strong>Whoops!</strong> There were some problems with your input.<br><br>
                            <ul>
                                <?php foreach($errors->all() as $error): ?>
                                    <li><?php echo e($error); ?></li>
                                <?php endforeach; ?>
                            </ul>
                        </div>
                    <?php endif; ?>

                 <?php if(Session::has('message')): ?>
                        <div class="alert alert-success">
                            <strong>  <?php echo e(Session('message')); ?> </strong>
                        </div>
                    <?php endif; ?>

<section class="section">
                        <div class="row sameheight-container">
                            <div class="col-xl-12">
                                <div class="card sameheight-item">
                                    <div class="card-block">
                       <?php if(count($employees) > 0): ?>
<?php
$tot=0;
?>
<div class="table-responsive">
                     <table class="table table-striped sortable">
                     <thead>
                         <tr>
                            <th>Date</th>
                            <th>Guest Name</th>
                            <th>Walk In <i class="fa fa-arrows-h"></i> Walk Out</th>
                            <th>Hours Spent</th>
                            <th>Purpose</th>
                            <th>Contact Info</th>
                            <th></th>
                         </tr>
                     </thead>
                     <tbody>
                      <?php foreach($employees as $emp): ?>
                    
                            <td><?php echo e(date('d-m-y', strtotime($emp->work_in))); ?></td>

                            <td> <?php echo e($emp->guest); ?></td>
                            <td>
                            <?php echo e(date('H:i:s', strtotime($emp->work_in))); ?> <i class="fa fa-arrows-h"></i> <?php echo e(date('H:i:s', strtotime($emp->work_out))); ?></td>
                            <td><?php echo e($emp->duration); ?> </td>                     
                            <td><?php echo e($emp->purpose); ?></td>
                            <td><?php echo e($emp->contact); ?></td>   


                             <td class="hidden-print" align="right">                          
                              <a href="<?php echo e(URL::to('admin/attendance/guest/edit/' . $emp->id)); ?>"><i class="fa fa-edit"></i></a>
                            &nbsp;  <a href="<?php echo e(URL::to('admin/attendance/delete/' . $emp->id)); ?>"><i class="fa fa-remove"></i></a>
                            </td> 
                        
                        </tr>
                         <?php endforeach; ?>
                       
                     </tbody>

                     </table>
                 </div>
                        <nav class="text-xs-right">
                       <?php echo str_replace('/?', '?', $employees->render()); ?>

                     </nav>
                    <?php else: ?>
                       <h3>No Data Found!</h3>
                    <?php endif; ?>
</div>
                                    <!-- /.card-block -->
                                </div>
                                <!-- /.card -->
                            </div>
                           
                        </div>
                    </section>      

                      
                   
                </article>



<!-- new creation -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">

  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel"><i class="fa fa-location-arrow"></i>Guest Log</h4>
      </div>
      <div class="modal-body">
  <form class="form-horizontal" role="form" method="POST" action="<?php echo e(url('/admin/attendance/guest/docreate')); ?>">
                        <input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
                        
        

                        
                            <div class="form-group">
                            <label class="control-label">Guest Name*</label>
                            
                            <input type="text" class="form-control underlined" name="guest" required>
                            
                        </div>
                        <div class="form-group">
                            <label class="control-label">Purpose*</label>
                            
                                                        <input type="text" class="form-control underlined" name="purpose" required>
                              
                        </div>
<div class="form-group">
                            <label class="control-label">Contact*</label>
                            
                            <input type="text" class="form-control underlined" name="contact" required>
                              
                        </div>

    <div class="form-group">
                 
          
              <div class="col-md-6">
              
                <input type="text" id="time-start" name="work_in" class="form-control underlined floating-label" placeholder="Start Time">
              </div>
          
               <div class="col-md-6">
                <input type="text" id="time-end" name="work_out" class="form-control underlined floating-label" placeholder="End Time">
              </div>
            </div>
                                     

                        </div> 
                        <br />
                        <br />       
<div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-times"></i> Cancel</button>
        <button type="submit" class="btn btn-primary"><i class="fa fa-check"></i> Save changes</button>
        </form>
      </div>
            
                                
      
                       

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

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

<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>