
<?php $__env->startSection('main-container'); ?>
<?php echo $__env->make('cdn', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<main id="main" class="main">
  <script src="https://gitcdn.github.io/bootstrap-toggle/2.2.2/js/bootstrap-toggle.min.js"></script>
  <link href="https://gitcdn.github.io/bootstrap-toggle/2.2.2/css/bootstrap-toggle.min.css" rel="stylesheet">
  <?php if($leads): ?>
 <div style="margin-top:15px ;">
    <h4 class="text-uppercase mb-3">Search Result</h4>
 </div>
<table class="table table-striped display nowrap" id="tabl" style="width:100%;">
                <thead>
                    <tr>
                        <th></th>
                        <th>Name</th>
                        <th>Phone</th>
                        <th>Country</th>
                        <th>Assign To</th>
                        <th>Created By</th>
                        <th>Remark View</th> 
                    </tr>
                </thead>
                <tbody> 
                 <?php $__currentLoopData = $leads; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                  <tr>
                    <td></td>
                    <td><?php echo e($value->name); ?></td>
                    <td><?php echo e($value->phone); ?></td>                
                    <td><?php echo e($value->country_info->name); ?></td>
                    <td>
                        <?php if($value->assigned==0): ?>
                        
                        <?php else: ?>
                            <?php echo e($value->assign->name); ?>

                        <?php endif; ?>
                    </td>
                    <td><?php echo e($value->createdby->name); ?></td>
                    <td>
                        <a class="btn btn-warning rounded-pill" role="button" data-toggle="modal" data-target="#remarkshow-<?php echo e($value); ?>">Remark View</a>
                    </td>    

                        <!-- Modal for remark show -->
                        <div class="modal fade" id="remarkshow-<?php echo e($value); ?>" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
                            <div class="modal-dialog" role="document">
                            <div class="modal-content">
                              <div class="modal-header">
                                <h5 class="modal-title" id="editModalLabel"> Remarks Lists</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                  <span aria-hidden="true">&times;</span>
                                </button>
                              </div>  
                              <div class="modal-body" style="background-color:#EFEDE7;">
                                <div class="row mb-2">
                                  <div class="col-md-6">
                                    <strong>Lead id:</strong>&ensp;<?php echo e($value->id); ?>

                                  </div>       
                                </div>
                                
                                <?php $__currentLoopData = $value->remark; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $remark): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <div class="row mb-2" >
                                <div class="row mb-1 mt-1">
                                  <div class="col-md-5">
                                    <strong>Date:</strong>&ensp;<?php echo e($remark->created_at->format('d/m/Y')); ?>

                                  </div>
                                  <div class="col-md-7">
                                    <span><strong>Follow Up:&nbsp;</strong></span>
                                     <?php $__currentLoopData = $remark->followup_type; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $arr): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                     <span style="padding: 1px; background-color: #FBBE3F;"><?php echo e($arr); ?>&nbsp;</span>
                                     <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                  </div>
                                 </div>
                                  <div class="row mb-1">       
                                     <span><strong>Remark:</strong>&ensp;<span style="text-transform:capitalize;"><?php echo e($remark->description); ?></span></span> 
                                  </div>
                                </div>
                                 <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                              </div>
                              <div class="modal-footer">
                                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                                <!-- <button type="submit" class="btn btn-primary">Ok</button> -->
                              </div>
                            
                            </div>
                            </div>
                            </div>
                   
                  </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
</table>
<?php else: ?>
  <h6 class="mt-5 text-center text-uppercase ">Result Not Found!</h6>
<?php endif; ?>      
</main>
<script type="text/javascript">  
   $(document).ready(function () {
    var table = $('#tabl').DataTable({
      order: [],
      columnDefs: [ { orderable: false, targets: [0,1,2,3,4,5,6] } ],
      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 /home/wwwtechturtlecon/public_html/lms.techturtleconsultant.com/resources/views/frontend/searchpage.blade.php ENDPATH**/ ?>