<?php $__env->startSection('content'); ?>
<div class="card">
    <div class="card-body">
        <h3 class="card-title">Personal Details </h3>
        <div class="row">
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="project_id">Customer ID :</label><?php echo e($customer->username); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="sector_id">Customer Name :</label><?php echo e($customer->full_name); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="block_id">Address :</label><?php echo e($customer->address); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="plot_id">City :</label><?php echo e($customer->city); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="plot_id">Pincode :</label><?php echo e($customer->pincode); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="plot_id">State :</label><?php echo e($customer->state); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="plot_id">Mobile :</label><?php echo e($customer->mobileno); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="plot_id">PAN :</label><?php echo e($customer->panno); ?>

              </div>
          </div>
          <div class="col-md-3">
              <div class="form-group">
                  <label class="control-label" for="plot_id">Aadhar no. :</label><?php echo e($customer->aadhar); ?>

              </div>
          </div>
        </div>
        <h4 class="card-title">Plot Booking Report</h4>
        <div class="table-responsive">
            <table class="table table-bordered" id="customers-table">
                    <thead>
                        <tr>
                            <th>Id</th>
                            <th>Name</th>
                            <th>Username</th>
                            <th>Customer Name</th>
                            <th>Customer Username</th>
                            <th>Plot/Block/Sector/Project</th>
                            <th>Area</th>
                            <th>Dimension</th>
                            <th>Total Amount</th>
                            <th>Paid</th>
                            <th>Due</th>
                            <th>Plot Status</th>
                            <th>Created At</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                </table>
        </div>
        <h4 class="card-title mt-3">Pending Booking Report</h4>
        <div class="table-responsive">
            <table class="table table-bordered" id="pendingBooking-table">
                    <thead>
                        <tr>
                            <th>Id</th>
                            <th>Name</th>
                            <th>Username</th>
                            <th>Plot/Block/Sector/Project</th>
                            <th>Area</th>
                            <th>Dimension</th>
                            <th>Total Amount</th>
                            <th>Paid</th>
                            <th>Due</th>
                            <th>Initial Amount</th>
                            <th>Plot Status</th>
                            <th>Created At</th>
                        </tr>
                    </thead>
                </table>
        </div>
    </div>
</div>
<!-- The Modal -->
<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">

      <!-- Modal Header -->
      <div class="modal-header">
        <h4 class="modal-title">Deals</h4>
        <button type="button" class="close" data-dismiss="modal">&times;</button>
      </div>

      <!-- Modal body -->
      <div class="modal-body">
        Modal body..
      </div>

      <!-- Modal footer -->
      <div class="modal-footer">
        <button type="button" class="btn btn-danger" data-dismiss="modal">Close</button>
      </div>

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

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

<?php $__env->startSection('javascript'); ?>
    <script>
        $('#customers-table').DataTable({
                processing: true,
                serverSide: true,
                ajax: {
                      url:'<?php echo e(url('/')); ?>/customer/deals/anydata',
                      data: function(d) {
                                d.project_id = $('select[name=project_id]').val();
                                d.block_id = $('select[name=block_id]').val();
                                d.sector_id = $('select[name=sector_id]').val();
                                d.plot_id = $('select[name=plot_id]').val();
                              }
                      },
                dom: 'lfrtip',
                'pageLength': 30,
                'lengthMenu': [ [10, 30, 50, -1], [10, 30, 50, "All"] ],
                'columns': [
                    { data: 'id', name: 'id' },
                    { data: 'full_name', name: 'full_name' },
                    { data: 'username', name: 'username' },
                    { data: 'c_full_name', name: 'c_full_name' },
                    { data: 'c_username', name: 'c_username' },
                    { data: 'name', name: 'name' },
                    { data: 'p_area', p_area: 'p_area' },
                    { data: 'p_dimension', p_dimension: 'p_dimension' },
                    { data: 'calc_total_amount', name: 'calc_total_amount' },
                    { data: 'paid_amount', name: 'paid_amount' },
                    { data: 'due_amount', name: 'due_amount' },
                    { data: 'p_status', name: 'p_status' },
                    { data: 'created_at', name: 'created_at' },
                    { data: 'action', name: 'action' }
                ],
                'order': [[1, 'asc']],
                drawCallback: function( settings ) {
                    //openModal();
                  },
                initComplete: function() {
                    
                }
            });

            $('#pendingBooking-table').DataTable({
                processing: true,
                serverSide: true,
                ajax: {
                      url:'<?php echo e(url('/')); ?>/customer/deals/pendingBookingAnyData',
                      },
                dom: 'lfrtip',
                'pageLength': 30,
                'lengthMenu': [ [10, 30, 50, -1], [10, 30, 50, "All"] ],
                'columns': [
                    { data: 'id', name: 'id' },
                    { data: 'full_name', name: 'full_name' },
                    { data: 'username', name: 'username' },
                    { data: 'name', name: 'name' },
                    { data: 'p_area', p_area: 'p_area' },
                    { data: 'p_dimension', p_dimension: 'p_dimension' },
                    { data: 'calc_total_amount', name: 'calc_total_amount' },
                    { data: 'paid_amount', name: 'paid_amount' },
                    { data: 'due_amount', name: 'due_amount' },
                    { data: 'initial_amount', name: 'initial_amount' },
                    { data: 'p_status', name: 'p_status' },
                    { data: 'created_at', name: 'created_at' },
                ],
                'order': [[0, 'asc']],
                drawCallback: function( settings ) {
                    //openModal();
                  },
                initComplete: function() {
                    
                }
            });


      $("select[name='project_id']").change(function(){
          var project_id = $(this).val();
          var token = $("input[name='_token']").val();
          $.ajax({
              url: "<?php echo route('select-ajax') ?>",
              method: 'POST',
              data: {project_id:project_id, _token:token},
              success: function(data) {
                $("select[name='sector_id'").html('');
                $("select[name='sector_id'").html(data.options);
              }
          });
      });

      $("select[name='sector_id']").change(function(){
          var sector_id = $(this).val();
          var token = $("input[name='_token']").val();
          $.ajax({
              url: "<?php echo route('select-ajax') ?>",
              method: 'POST',
              data: {sector_id:sector_id, _token:token},
              success: function(data) {
                $("select[name='block_id'").html('');
                $("select[name='block_id'").html(data.options);
              }
          });
      });

      $("select[name='block_id']").change(function(){
          var block_id = $(this).val();
          var token = $("input[name='_token']").val();
          $.ajax({
              url: "<?php echo route('select-ajax') ?>",
              method: 'POST',
              data: {block_id:block_id, _token:token},
              success: function(data) {
                $("select[name='plot_id'").html('');
                $("select[name='plot_id'").html(data.options);
              }
          });
      });
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.customer', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH G:\xampp\htdocs\yespropmart2.loc\resources\views/customers/index.blade.php ENDPATH**/ ?>