<?php $__env->startSection('content'); ?>
<div class="content" id="content">

  <div class="overlay"></div>     
  
<?php echo $__env->make('admin.includes.topbar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
  
  <!-- main content -->
  <div class="main-content">


    <!-- panel -->
<?php if(Session::has('error')): ?>
<div class="alert bg-danger text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>

<?php if(Session::has('success')): ?>
<div class="alert bg-success text-white">
              <?php echo Session::get('success'); ?>

            </div>

<?php endif; ?>





<!-- panel -->
        <div class="panel panel-piluku panel-users">
          <div class="panel-heading">
            <h3 class="panel-title">
              List of Clients (<?php echo $booking->booking_no; ?>)
              <span class="panel-options">
                <a href="#" class="panel-refresh">
                  <i class="icon ti-reload"></i> 
                </a>
                <a href="#" class="panel-minimize">
                  <i class="icon ti-angle-up"></i> 
                </a>
                <a href="#" class="panel-close">
                  <i class="icon ti-close"></i> 
                </a>
              </span>
            </h3>
          </div>
          <div class="panel-body nopadding">
            <div class="table-responsive">
              <table class="table table-hover">
                <thead>
                  <tr>
                            <th>#</th>
                            <th>Name</th>
                            <th>Email</th>
                            <th>Passport No.</th>
                            <th>Nationality</th>
                            <th>Created at</th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                    <th>&nbsp;</th>
                  
                  </tr>
                </thead>
                <tbody>
                <?php 
                $count = count($clients) + 1;

                 ?>
                     <?php foreach($clients as $client): ?>
                      <?php 
                     $count = $count - 1;

                      ?>

                  <tr class="table-row">
                            <td><?php echo $count; ?></td>
                            <td><?php echo $client->name; ?></td>
                            <td><?php echo $client->email; ?></td>
                            <td><?php echo $client->passport_no; ?></td>
                            <td><?php echo $client->nationality; ?></td>
                            <td><?php echo Carbon\Carbon::parse($client->updated_at)->format('d-m-Y H:m:i'); ?></td>

                    <td>

                      <a href="<?php echo URL('admin/bookings/rooms/clients/edit'); ?>/<?php echo $client->id; ?>" class="btn btn-green"><i class="ion ion-edit"></i></a>

                      
                      
                      <?php if($client->lead_guest == 1): ?>
                     <a href="#" class="btn btn-green">
                      LEAD
                      </a>
                      <?php else: ?>
                       <a href="<?php echo URL('/admin/bookings/lead'); ?>/<?php echo $client->id; ?>" class="btn btn-warning">
                      SELECT
                      </a>
                      <?php endif; ?>
                    </td>
                    <?php if(strlen($client->document_copy) != 0): ?>
                    <td>
                      <a href="<?php echo URL($client->document_copy); ?>" target="_blank" class="btn btn-green">Document</a>
                    </td>
                    <?php else: ?>
                    <td>
                    </td>
                    <?php endif; ?>

                    <?php if(Entrust::can('bookings_rooms_clients_delete')): ?>
                    <td>
                      <a href="<?php echo URL('/admin/bookings/rooms/clients/delete'); ?>/<?php echo $client->id; ?>" class="btn btn-red"><i class="ion ion-ios-trash-outline"></i></a>
                    </td>
                    <?php endif; ?>
                      
                  </tr>
                  <?php endforeach; ?>
                  
                </tbody>
              </table>
            </div>
          </div>
        </div>
        <!-- /panel -->



</div>
<!-- /main content -->        
<?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>