
    <?php if(isset($booking_list)): ?>
    <?php $__currentLoopData = $booking_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
     <?php (
                        $pass_data = array(
                            'id'                       => Crypt::encrypt($rows->id),
                            'reg_date'                 => EF::dateFormat(($rows->created_at)),

                          )
                      ); ?>

    <tr  <?php if($rows->is_block == 1): ?> style = "background-color:pink;" <?php endif; ?>  >
      <td><?php echo e($loop->iteration); ?></td>

      <td><?php echo e($rows->ms); ?></td>
      <td><?php echo e($rows->file_number); ?></td>


      <td> <?php echo e(ucfirst($rows->user->name)); ?></td>


      <td><?php echo e(EF::showPlotFormat($rows->plot)); ?> </td>


      <td>
        <?php if($rows->status == "Approve"): ?> 
          <span class="badge badge-success"><?php echo e(EF::getstatus($rows->status)); ?></span>
        <?php elseif($rows->status == "Unapprove"): ?> 
          <span class="badge badge-primary"><?php echo e(EF::getstatus($rows->status)); ?></span>
        <?php else: ?>
          <span class="badge badge-warning"> <?php echo e($rows->status); ?></span>
        <?php endif; ?>
      </td>



      <td><?php echo e($rows->branch->name); ?></td>

      <?php ($booking_salesperson = $commission->getBookingSalesPerson($rows->id)); ?>
      
      <td >
      
        <?php $__currentLoopData = $booking_salesperson; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <?php if($row->user->type == "Employee"): ?>
        <span class="badge badge-primary"> <?php echo e(strtoupper($row->user->name)); ?></span>
         <?php endif; ?>

        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
       
      </td>

      <td><?php echo e(EF::dateFormat($rows->created_at)); ?></td>
        <?php if(Auth::user()->hasAnyPermission(['All','Tag Booking'])): ?>
      <td>

        <span style ="margin-right :4px;" onClick = "markTags(event,this,'<?php echo e(Crypt::encrypt($rows->id)); ?>','<?php echo e($rows->is_hotitem); ?>','<?php echo e(Crypt::encrypt('is_hotitem')); ?>')">
          <?php if($rows->is_hotitem == 0): ?>
          <img src= " <?php echo e(asset('assets/images/icons/staroutline.png')); ?>" data-toggle="tooltip" data-placement="top" title="Mark Hot"/>
          
          <?php elseif($rows->is_hotitem == 1): ?>
          <img src= "<?php echo e(asset('assets/images/icons/starfilled.png')); ?>" data-toggle="tooltip" data-placement="top" title="Unmark Hot"/>

          
        <?php endif; ?></span>
       
         <span style ="margin-right :4px;"  onClick = "markTags(event,this,'<?php echo e(Crypt::encrypt($rows->id)); ?>','<?php echo e($rows->is_block); ?>','<?php echo e(Crypt::encrypt('is_block')); ?>')">
          <?php if($rows->is_block == 0): ?>
          <img src= " <?php echo e(asset('assets/images/icons/blockoutline.png')); ?>" data-toggle="tooltip" data-placement="top" title="Block"/>
          <?php else: ?>
          <img src= " <?php echo e(asset('assets/images/icons/blockfilled.png')); ?>" data-toggle="tooltip" data-placement="top" title="Unblock"/>
          <?php endif; ?>
        </span>
         <span  onClick = "markTags(event,this,'<?php echo e(Crypt::encrypt($rows->id)); ?>','<?php echo e($rows->is_resale); ?>','<?php echo e(Crypt::encrypt('is_resale')); ?>')">
          <?php if($rows->is_resale == 0): ?>
           <img width = "18px;" src= " <?php echo e(asset('assets/images/icons/saleoutline.png')); ?>" data-toggle="tooltip" data-placement="top" title="Mark Resale"/>
          <?php else: ?>
           <img  width = "18px;" src= " <?php echo e(asset('assets/images/icons/salefilled.png')); ?>" data-toggle="tooltip" data-placement="top" title="Unmark Resale"/>
          <?php endif; ?>
        </span>
      </td>
      <?php endif; ?>

      <td class="text-center"> 
       <div class="item-action dropdown">
        <a href="javascript:void(0)" data-toggle="dropdown" class="icon"><i class="fa fa-list-ul"></i></a>
        <div class="dropdown-menu dropdown-menu-right">
   
         <?php if(Auth::user()->hasAnyPermission(['All','Booking Details'])): ?>
         <a  href="<?php echo e(route('booking.details',['id' => Crypt::encrypt($rows->id)])); ?>" content="View Details" class="dropdown-item"><i class="dropdown-icon fa fa-eye "></i> View Details</a>
         <?php endif; ?>

          <?php if(Auth::user()->hasAnyPermission(['All','Approve Booking'])): ?>
         <?php if($rows->status == "Unapprove"): ?>
         <a  onclick="update(event,'<?php echo e(json_encode($pass_data)); ?>','form_approve_booking','md_approve_booking')" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-check"></i>Approve </a>
         <?php endif; ?>
         <?php endif; ?>
         <?php if(Auth::user()->hasAnyPermission(['All','Delete Booking'])): ?>

         <a  href="<?php echo e(route('booking.trash',['id' => Crypt::encrypt($rows->id)])); ?>"  class="dropdown-item cls_delete" content="delete"><i class="dropdown-icon fa fa-trash "></i> Delete </a>
         <?php endif; ?>
         

         <?php if($rows->status == "Approve"): ?>
          <?php if(Auth::user()->hasAnyPermission(['All','Cancel Booking Request'])): ?>

         <a  href="<?php echo e(route('showcancelbooking',['id' => Crypt::encrypt($rows->id)])); ?>"  class="dropdown-item "><i class="dropdown-icon fas fa-times "></i> Cancel </a>
         <?php endif; ?>
          <?php if(Auth::user()->hasAnyPermission(['All','Transfer Booking Request'])): ?>

         <a  href="<?php echo e(route('booking.transfer',['id' => Crypt::encrypt($rows->id)])); ?>" content="Transfer" class="dropdown-item"><i class="dropdown-icon fa fa-eye "></i>Transfer</a>
         <?php endif; ?>
         <?php endif; ?>

         <?php if(Auth::user()->hasAnyPermission(['All','Booking Ledger'])): ?>
         <a onclick="showBookingLedger(event,'<?php echo e(Crypt::encrypt($rows->id)); ?>');" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-money"></i> Booking Ledger</a>
         <?php endif; ?>

           <?php if(Auth::user()->hasAnyPermission(['All','View Document'])): ?>
            <a onclick="showDocument(event,'<?php echo e(Crypt::encrypt($rows->id)); ?>');" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-file"></i> Documents</a>
         <?php endif; ?>
       </div>
     </div>

   </td>
 </tr>

 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
 <?php endif; ?>   
<?php /**PATH /home/ubuntu/rebmgisplus/skylite/resources/views/components/booking/table_booking.blade.php ENDPATH**/ ?>