
<?php $__env->startSection('main-container'); ?>
<main id="main" class="main">
<?php echo $__env->make('cdn', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  <div style="margin-top:13px ;">
    <h4 class="text-uppercase mb-3">Contact Lead Pool Details</h4>
  </div>

   <form action="<?php echo e(url('/multipleassign')); ?>" method="POST">
    <?php echo csrf_field(); ?>   

  <div class="mb-1">
   <?php if(Auth::user()->role=="Manager"): ?>
  
   <a role="button" data-toggle="modal" data-target="#assignLeadToGroupUser<?php echo e($group_user); ?>"><button class="btn btn-warning rounded-pill"><i class="bi bi-send-fill"></i>Assign To Group User</button></a>

                         <!-- Modal -->
                        <div class="modal fade" id="assignLeadToGroupUser<?php echo e($group_user); ?>" tabindex="-1" role="dialog" aria-labelledby="editModalLabel3" aria-hidden="true">
                         <div class="modal-dialog" >
                            <div class="modal-content">
                              <div class="modal-header">
                                <h5 class="modal-title" id="editModalLabel3">Assign Lead To Group User</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                  <span aria-hidden="true">&times;</span>
                                </button>
                              </div>
                              <div class="modal-body">
                                <div class="row mb-3">
                                <label for="inputText" class="col-sm-3 col-form-label">Assign To:</label>
                                  <div class="col-sm-7">
                                   <select name="assigned_user_id3" class="form-control custom-select" style="text-transform:capitalize;">
                                      <?php if($group_user): ?>
                                      <option value="">Select Group Users</option>
                                      <?php $__currentLoopData = $group_user; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $guser): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                      <option value="<?php echo e($guser->user_id); ?>"><?php echo e($guser->UserName->name); ?></option>
                                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                      <?php endif; ?>
                                   </select>
                                  </div>          
                                </div>  
                              </div>
                              <div class="modal-footer">
                                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                                <button type="submit" class="btn btn-primary">Assign</button>
                              </div>
                          </div>
                         </div>
                        </div> 

  <?php endif; ?>
  </div>

  <table class="table table-striped display nowrap" id="tabl" style="width:100%;">
                <thead>
                    <tr>
                        <th> </th>
                        <th>#</th>
                        <th>Name</th>
                        <th>Phone</th>
                        <th>Created By</th>
                        <th>Action</th>
                      
                    </tr>
                </thead>
                <tbody> 
                 <?php $__currentLoopData = $leads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <tr>
                    <td> </td>
                    <td><input type="checkbox" name="assign_lead_id[]" class="form-check-inline" value="<?php echo e($value->id); ?>"></td>
                    <td><?php echo e($value->name); ?></td>
                    <td><?php echo e($value->phone); ?></td>  
                    <td><?php echo e($value->createdby->name); ?></td>           
                    <td>   

                      <a href="<?php echo e(url('/leadmoreview/'.$value->id)); ?>" ><i class="bi bi-eye" style="color:blueviolet;"></i></a>

                     </td> 
                
                  </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
        </table>
 </form>
</main>
<script type="text/javascript">  
   $(document).ready(function () {
     var table = $('#tabl').DataTable({
      order: [],
      columnDefs: [ { orderable: false, targets: [0,1,2,3,4,5] } ],
      bFilter: false, 
      responsive: true
    });

    new $.fn.dataTable.FixedHeader( table );
  });
  </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('frontend.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\CRM\resources\views/frontend/contactleadpool.blade.php ENDPATH**/ ?>