<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-body">
        <h3 class="card-title"><?php echo e(ucwords($type)); ?> Leads</h3>
        <div class="table-responsive">
            <table class="table table-bordered" id="users-table">
                    <thead>
                        <tr>
                            <th>S. No.</th>
                            <th>Business Partner ID</th>
                            <th>Business Partner Name</th>
                            <th>Type</th>
                            <th>Customer Name</th>
                            <th>KW</th>
                            <th>City</th>
                            <th>Bank Name</th>
                            <th>Property Type</th>
                            <th>Tracking No.</th>
                            <th>Created On</th>
                            <th>Status</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                </table>
        </div>
    </div>
</div>
<div class="modal fade" id="loadModalAjax" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" style="display: none;" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
    </div>
    <!-- /.modal-content -->
   </div>
  <!-- /.modal-dialog -->
</div>

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

<?php $__env->startSection('javascript'); ?>
    <script>
        var t = $('#users-table').DataTable({
                processing: true,
                serverSide: true,
                ajax: '<?php echo url('/'); ?>/myLeadsListAnyData/<?php echo e($type); ?>',
                dom: 'Bfrtip',
                'lengthMenu': [ [10, 25, 50, -1], [10, 25, 50, "All"] ],
                columns: [
                    { data: 'id', name: 'id', searchable:false },
                    { data: 's_username', name: 's_username' },
                    { data: 's_full_name', name: 's_full_name' },
                    { data: 'lead_type', name: 'lead_type' },
                    { data: 'full_name', name: 'full_name' },
                    { data: 'kw', name: 'kw' },
                    { data: 'city_name', name: 'city_name' },
                    { data: 'bank_name', name: 'bank_name' },
                    { data: 'property_type', name: 'property_type' },
                    { data: 'ack_number', name: 'ack_number' },
                    { data: 'created_at', name: 'created_at', searchable:false },
                    { data: 'status_name', name: 'status_name' },
                    { data: 'action', name: 'action' },
                ],
                "columnDefs": [
                    {
                        "render": function ( data, type, row, meta) {
                            return meta.row + meta.settings._iDisplayStart + 1;
                         },
                        "targets": 0
                    }
                    // {
                    //     "render": function ( data, type, row ) {
                    //         return data.replace(".00", "")+'%';
                    //     },
                    //     "targets": 3
                    // },
                    
                ],
                'order': [[1, 'asc']],
                drawCallback: function( settings ) {
                    //openModal();
                  }
            });

            function copyText(copyText) {
              //var copyText = document.getElementById("copyInput");
              navigator.clipboard.writeText(copyText).then(() => {
                alert("Text copied: " + copyText);
              });
            }
            

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

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home2/justsolar/public_html/resources/views/leads/myLeadsList.blade.php ENDPATH**/ ?>