<?php $__env->startSection('page_title'); ?>
	CallCenter
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_header_title'); ?>
	Manage Call Center
<?php $__env->stopSection(); ?>



<?php $__env->startSection('page_body'); ?>

<?php echo e(Breadcrumbs::render('call center')); ?>

	<div class="row row-cards row-deck">
              <div class="col-12">
                <div class="card">
                	  <div class="card-header">
                       <?php if(Auth::user()->hasAnyPermission(['All','Add Call'])): ?>
					     <button  class="float-right btn btn-sm btn-outline-primary" data-toggle="modal" data-target="#md_add_call"><i class="fa fa-plus"></i></button> &nbsp;&nbsp;
               <?php endif; ?>
            
					     <h3 class="card-title">Add Call</h3>
					  </div>

                	<div class="card-status card-status-left bg-blue"></div>
                  <div class="table-responsive table-height">
                    <table class="table table-hover table-outline table-vcenter text-nowrap card-table cls_datatable">
                      <thead>
                        <tr>
                          
                          <th>#</th>
                          <th>Name</th>
                          <th>Cnic</th>
                          <th>Contact</th>
                          <th>Interest</th>
                       
                          <th style="text-align: center;"><i class="dropdown-icon fa fa-cogs"></i></th>
                          
                        </tr>
                      </thead>
                      <tbody>
                         <?php ($pass_data = []); ?>
                        <?php $__currentLoopData = $calls; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $rows): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                         <?php (
                              $pass_data = array(
                                  'id'      => Crypt::encrypt($rows->id),
                                  'name'        => $rows->name,
                                  'cnic'        => $rows->cnic,
                                  'contact'     => $rows->contact,
                                  'interest'  => $rows->interest,
                                )
                            ); ?>
                        <tr>
                          <td><?php echo e($loop->iteration); ?></td>
                          <td><?php echo e(ucfirst($rows->name)); ?></td>
                           <td><?php echo e($rows->cnic); ?></td>
                            <td><?php echo e($rows->contact); ?></td>
                             <td><p style="word-wrap: break-word;"><?php echo wordwrap($rows->interest,130,'<br>'); ?></p></td>
                              <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','Update Call'])): ?>
                                      <a onclick="update(event,'<?php echo e(json_encode($pass_data)); ?>','form_update_call','md_update_call')" href="javascript:void(0)" class="dropdown-item"><i class="dropdown-icon fa fa-edit"></i> Update </a>
                                      <?php endif; ?>

                                      <?php if(Auth::user()->hasAnyPermission(['All','Remove Call'])): ?>

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

                                      <?php endif; ?>

                                
                                     
                                     
                                    </div>
                                  </div>
                               </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      	
                      </tbody>
                    </table>
                  </div>
                </div>
              </div>
          </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('page_modal'); ?>
  <?php echo $__env->make('callcenter.modals.add_call', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
  <?php echo $__env->make('callcenter.modals.update_call', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>


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

<?php $__env->startSection('page_script'); ?>
	
<?php $__env->stopSection(); ?>

  
<?php echo $__env->make('layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/skylite/resources/views/callcenter/manage_calls.blade.php ENDPATH**/ ?>