

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



<div class="card mb-4">
    <div class="card-header">
        <div class="d-flex">
            <div class="mr-auto p-2 align-self-center"><h4>Customer Reports</h4></div>
        </div>
        <div class="row">
            <div class="col-lg-6 col-sm-6">
                <div class="form-group">
                    <input type="text" class="form-control" value="" name="customersearch" id="CustomerSearch">
                </div>
                    <button type="submit" class="btn btn-primary" onclick="searchCustomer()"><i class="fas fa-search"></i> Search</button>
            </div>         
        </div>    
    </div>

    <div class="card-body" id="search_results">
        <div class="row">
            <div class="table-responsive" >
                <table class="table">
                    <thead>
                        <tr>
                            <td><b>Customer Name</b></td>
                            <td><b>Mobile</b></td>
                            <td><b>Email</b></td>
                        </tr>
                    </thead>
                </table>
            </div>
        </div>
        <div class="table-responsive" >
            <table class="table table-hover" id="search_tbl">
                <thead class="thead-light">
                    <tr>
                        <th>SLNO.</th>
                        <th>Order No.</th>
                        <th>Status</th>
                        <th>Duration</th> 
                        <th>Order Date</th> 
                    </tr>
                </thead>
                <tbody>
                   
                </tbody>
                
            </table>
        </div>
    </div>

    <div class="card-footer">
        <div class="row">
            <div class="col-lg-6">
                <div class="d-flex justify-content-start font-weight-bold">
                <a href=""><button class="btn btn-danger">Save Pdf</button></a>     
                </div>
            </div> 
            <div class="col-lg-6">
                <div class="d-flex justify-content-end font-weight-bold">
                    <form method="post" action="<?php echo e(route('CustomerSearchPrint')); ?>">
                    <?php echo csrf_field(); ?>
                        <input type="hidden" name="InputforPrint" id="InputforPrint">
                        <button type="submit" class="btn btn-primary">Print</button> 
                    </form>  
                </div>
            </div>
        </div>            
    </div>
</div>    



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

<script>
function searchCustomer(){
    
    
var items = document.getElementById("CustomerSearch").value;

document.getElementById("InputforPrint").value=items;
$.ajax({
    
      url: '<?php echo e(route('SearchingCustomer')); ?>',
      method: "get",
      
      data: {_token: '<?php echo e(csrf_token()); ?>',searchitems:items },
                              success: function (response){   
                                
                                document.getElementById('search_results').innerHTML=response; 
                              
                                      }
                      });   
}  

</script>
<?php echo $__env->make('layouts.adminapp', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\washclub\resources\views/CustomerSearch/index.blade.php ENDPATH**/ ?>