 
 <?php $__env->startSection('content'); ?>
 <div class="card">
   <div class="card-header">
     <h3 class="card-title">Customer List</h3>
   </div>
   <div align="left">
     <a href="<?php echo e(url('admin/customer/create')); ?>" class="btn btn-info">Add New </a>
   </div>
   <div class="card-header">
     <form role="form" method="get" action="">
       <div class="box-body">
         <div class="row">
           <div class="col-md-3">
             <div class="form-group">
               <input type="text" name="search_mobile" class="form-control  " value="<?php echo e(Request::get('search_mobile')); ?>" placeholder="user mobile">

             </div>
           </div>
           <div class="col-md-3">
             <div class="form-group">
               <input type="text" name="search_name" class="form-control  " value="<?php echo e(Request::get('search_name')); ?>" placeholder="user name">

             </div>
           </div>

           <div class="col-md-3">
             <div class="form-group">
               <select class="form-control select2" name="search_status" style="width: 100%;">
                 <option value="">--Page Show --</option>
                 <option value="10" <?php echo e(Request::get('search_status') == '10' ? 'selected' : ''); ?>>10</option>
                 <option value="50" <?php echo e(Request::get('search_status') == '50' ? 'selected' : ''); ?>>50</option>
                 <option value="100" <?php echo e(Request::get('search_status') == '100' ? 'selected' : ''); ?>>100</option>
                 <option value="500" <?php echo e(Request::get('search_status') == '500' ? 'selected' : ''); ?>>500</option>
                 <option value="1000" <?php echo e(Request::get('search_status') == '1000' ? 'selected' : ''); ?>>1000</option>
                 <option value="5000" <?php echo e(Request::get('search_status') == '5000' ? 'selected' : ''); ?>>5000</option>
               </select>

             </div>
           </div>



           <div class="col-md-3">
             <button type="submit" class="btn btn-success mr-2">Search</button>
             <a href="<?php echo e(url('admin/customer')); ?>" class="btn btn-danger mr-2">Reset</a>


           </div>

         </div>
       </div>
     </form>
   </div>
   <!-- /.card-header -->
   <div class="card-body">
     <?php if(session()->has('message')): ?>
     <div class="alert alert-success">
       <?php echo e(session()->get('message')); ?>

     </div>
     <?php endif; ?>
     <div id="example1_wrapper" class=" dt-bootstrap4">
       <div class="row">
         <div class="col-md-12">
           <div class='tablescroll'>
             <div class="table-responsive">
               <table id="example1" class="table table-bordered table-striped datatable    " role='grid'
                 aria-describedby="example1_info">
                 <thead>
                   <tr role="row">
                     <th class="sorting_asc" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                       aria-sort="ascending"
                       aria-label="Rendering engine: activate to sort column descending"
                       style="width: 60px;">#
                     </th>

                     <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                       aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                       Customer Name
                     </th>
                     <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                       aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                       Mobile No.
                     </th>
                     <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                       aria-label="Browser: activate to sort column ascending" style="width: 207px;">
                       Password.
                     </th>
                     <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                       aria-label="Browser: activate to sort column ascending" style="width: 50px;">
                       Amount
                     </th>
                     <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                       aria-label="Browser: activate to sort column ascending" style="width: 50px;">
                       Status
                     </th>

                     <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1"
                       aria-label="CSS grade: activate to sort column ascending" style="width: 250px;">
                       Action
                     </th>

                   </tr>
                 </thead>
                 <tbody>
                   <?php
                   $page=1;
                   if(Request::input('page'))
                   $page=Request::input('page');
                   $sort = $lists->perPage();
                   ?>
                   <?php $__empty_1 = true; $__currentLoopData = $lists; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $list): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>

                   <tr>
                     <td><?php echo e($sort*($page-1)+($key+1)); ?></td>

                     <td>
                       <a><?php echo e($list->name); ?></a>

                     </td>
                     <td>
                       <a><?php echo e($list->mobile_number); ?></a>

                     </td>
                     <td>
                       <a><?php echo e($list->password); ?></a>

                     </td>
                     <td>
                       <a><?php echo e(isset($list->paymentHistory) ? $list->paymentHistory->remain_amount  : ''); ?></a>

                     </td>

                     <td>
                       <a href="<?php echo e(url('change/'.$list->id)); ?>" class="badge rounded-pill p-2 px-3 btn-<?php echo e(($list->status == '0') ? 'danger' : 'success'); ?> button_flow" data-toggle="tooltip" data-placement="top" title="" onclick="return confirm('Do you Really want to <?php echo e(($list->status == '0') ? 'Active' : 'Inactive'); ?> this User?')"> <i class="fa <?php echo e(($list->status == '0') ? 'fa-toggle-off' : 'fa-toggle-on'); ?> fa-xl"></i></a>

                     </td>

                     <td>

                       <a href="<?php echo e(url('admin/customer/'.$list->id.'/edit')); ?>"
                         class="btn btn-primary"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>


                       <button type="button" class="btn btn-info btn-lg" data-toggle="modal" onclick="openModal(<?php echo e($list->id); ?>)"><i class="fa fa-plus" aria-hidden="true"></i></button>

                       <button type="button" class="btn btn-danger btn-lg" data-toggle="modal" onclick="removePoint(<?php echo e($list->id); ?>)"><i class="fa fa-minus-circle" aria-hidden="true"></i></button>

                       <a href="<?php echo e(url('admin/customer/'.$list->id)); ?>"
                         class="btn btn-success"><i class="fa fa-eye" aria-hidden="true"></i></a>
                       <a href="<?php echo e(url('/admin/customerdelete/'.$list->id)); ?>" class="btn btn-xs btn-danger button_flow" data-toggle="tooltip" data-placement="top" title="" onclick="return confirm('Are you sure you want to delete this Customer ?')"><i class="fa fa-trash"></i></a>


                       <a href="<?php echo e(url('admin/userpalyed/'.$list->id)); ?>"
                         class="btn btn-success"><i class="fa fa-play" aria-hidden="true"></i></a>

                       <a href="<?php echo e(url('admin/transcation/'.$list->id)); ?>"
                         class="btn btn-success"><i class="fa fa-history" aria-hidden="true"></i></a>

                     </td>

                   </tr>
                   <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                   <tr>
                     <td colspan="5">Record not found </td>
                   </tr>
                   <?php endif; ?>
                 </tbody>
               </table>

             </div>

           </div>

           <div class="row">

             <div class="col-md-6 text-left" style="margin: 20px 0px;">
               Showing <?php echo e($lists->firstItem()); ?> to <?php echo e($lists->lastItem()); ?> of <?php echo e($lists->total()); ?>

             </div>


             <div class='col-md-6 text-md-right text-start'>
               <div class='flex-wrap'>
                 <?php echo $lists->appends(request()->input())->links(); ?>

               </div>
             </div>
           </div>



         </div>
       </div>
     </div>
   </div>
 </div>


 <!-- Modal -->
 <div id="myModal" class="modal fade" role="dialog">
   <div class="modal-dialog">

     <!-- Modal content-->
     <div class="modal-content">
       <!--  <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Modal Header</h4>
      </div> -->
       <div class="modal-body">
         <div class="container">
           <div class="justify-content-center">
             <div class="">
               <div class="card">
                 <div class="card-header">Add Point <button type="button" class="close" data-dismiss="modal">&times;</button></div>
                 <div class="card-body">
                   <?php if($errors->any()): ?>
                   <div class="alert alert-danger">
                     <ul>
                       <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                       <li><?php echo e($error); ?></li>
                       <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                     </ul>
                   </div>
                   <?php endif; ?>
                   <form method="post" action="<?php echo e(url('/admin/payment')); ?>" autocomplete="off" enctype="multipart/form-data">
                     <?php echo csrf_field(); ?>
                     <div class="form-group">
                       <label for="title">Payment </label>
                       <input type="number" class="form-control"
                         name="amount" id="amount" required placeholder="Enter Amount" required="">
                     </div>



                     <br>
                     <input type="hidden" name="user_id" value="">
                     <div class="form-group">
                       <button type="submit" class="btn btn-primary">Submit</button>
                     </div>

                   </form>
                 </div>
               </div>
             </div>
           </div>
         </div>
       </div>
       <div class="modal-footer">
         <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
       </div>
     </div>

   </div>
 </div>


 <!-- Modal -->
 <div id="rmovePoint" class="modal fade" role="dialog">
   <div class="modal-dialog">

     <!-- Modal content-->
     <div class="modal-content">
       <!--  <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">&times;</button>
        <h4 class="modal-title">Modal Header</h4>
      </div> -->
       <div class="modal-body">
         <div class="container">
           <div class="justify-content-center">
             <div class="">
               <div class="card">
                 <div class="card-header">Remove Point <button type="button" class="close" data-dismiss="modal">&times;</button></div>
                 <div class="card-body">
                   <?php if($errors->any()): ?>
                   <div class="alert alert-danger">
                     <ul>
                       <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                       <li><?php echo e($error); ?></li>
                       <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                     </ul>
                   </div>
                   <?php endif; ?>
                   <form method="post" action="<?php echo e(url('/admin/removepoint')); ?>" autocomplete="off" enctype="multipart/form-data">
                     <?php echo csrf_field(); ?>
                     <div class="form-group">
                       <label for="title">Payment </label>
                       <input type="number" class="form-control"
                         name="amount" id="amount" required placeholder="Enter Amount" required="">
                     </div>



                     <br>
                     <input type="hidden" name="user_idr" value="">
                     <div class="form-group">
                       <button type="submit" class="btn btn-primary">Submit</button>
                     </div>

                   </form>
                 </div>
               </div>
             </div>
           </div>
         </div>
       </div>
       <div class="modal-footer">
         <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
       </div>
     </div>

   </div>
 </div>
 <?php $__env->stopSection(); ?>
 <?php $__env->startSection('js-content'); ?>
 <script>
   function openModal(id) {
     $('input[name="user_id"]').val(id);
     $('#myModal').modal();
   }

   function removePoint(id) {
     $('input[name="user_idr"]').val(id);
     $('#rmovePoint').modal();
   }
 </script>
 <?php $__env->stopSection(); ?>
<?php echo $__env->make('admin.layouts.main-layout', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/profcymadev/public_html/jr777.profcymadev.in/resources/views/admin/customer/index.blade.php ENDPATH**/ ?>