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

<main id="main" class="main">
    <?php echo $__env->make('cdn', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
     <script type="text/javascript" src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
     <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.min.js" integrity="sha384-cVKIPhGWiC2Al4u+LWgxfKTRIcfu0JTxR+EQDz/bgldoEyl4H0zUF0QKbrJ0EcQF" crossorigin="anonymous"></script>
     <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <div class="container mt-2" style="margin-top: 100px; height: 550px;">
        
        <h3 class="card-title">Customers</h3>
         <?php if($message = Session::get('success')): ?>
         <div class="alert alert-success" id="alert">
            <button type="button" class="close" data-dismiss="alert">x</button>
         <p><?php echo e($message); ?></p>
        </div>
         <?php endif; ?>
         <div class="btn-lg float-right">
          <a href="<?php echo e(url('/components-regis')); ?>"><button type="submit" class="btn btn-info">Add Customer</button> </a>

          <!-- IMPORT BUTTON -->

          <!-- <a class="btn btn-info" role="button" data-toggle="modal" data-target="#importcustomer" style="color: white;">Import</a>

                       
                            <div class="modal fade" id="importcustomer" tabindex="-1" role="dialog" aria-labelledby="importModalLabel" aria-hidden="true">
                            <div class="modal-dialog" role="document">
                            <div class="modal-content">
                              <div class="modal-header">
                                <h5 class="modal-title" id="importModalLabel">Import Customer</h5>
                                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                                  <span aria-hidden="true">&times;</span>
                                </button>
                              </div>
                             
                               <form action="" method="post">
                                <?php echo e(csrf_field()); ?>

                              
                              <div class="modal-body">
                                <div class="row mb-6">
                                   <div class="form-group<?php echo e($errors->has('csv_file') ? ' has-error' : ''); ?>">
                                    <label for="csv_file" class="col-md-4 control-label">CSV file to import</label>

                                    <div class="col-md-6">
                                        <input id="csv_file" type="file" class="form-control" name="csv_file" required>

                                        <?php if($errors->has('csv_file')): ?>
                                            <span class="help-block">
                                            <strong><?php echo e($errors->first('csv_file')); ?></strong>
                                        </span>
                                        <?php endif; ?>
                                    </div>
                                </div>       
                                </div>  
                              </div>
                              <div class="modal-footer">
                                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                                <button type="submit" class="btn btn-primary">Ok</button>
                              </div>
                            </form>
                            </div>
                            </div>
                            </div> -->
                    
          </div>
        <table class="table table-striped display nowrap " id="tabl">
            <thead>
                <tr>
                    <th>S.No</th>
                    <th>Name</th>
                    <th>Company</th>
                    <th>Email</th>
                    <th>Address</th>
                    <th>Mobile</th>
                    <!-- <th>country</th>
                    <th>state</th>
                    <th>city</th> -->
                    <th>Action</th>  
                </tr>
            </thead>
            <tbody>
                <?php $__currentLoopData = $companies; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $company): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                        <td><?php echo e($company->id); ?></td>
                        <td><?php echo e($company->name); ?></td>
                        <td><?php echo e($company->c_name); ?></td>
                        <td><?php echo e($company->email); ?></td>
                        <td><?php echo e($company->address); ?></td>
                        <td><?php echo e($company->mobile); ?></td>
                        <!-- <td><?php echo e($company->country_info->name); ?></td>
                        <td><?php echo e($company->state_info->name); ?></td>
                        <td><?php echo e($company->city_info->name); ?></td>   -->
                        <td><a href="<?php echo e(url('company-edit',$company->id)); ?>"><button type="submit" class="btn btn-info">Edit</button> </a>
                             <a href="<?php echo e(url('company-delete',$company->id)); ?>"><button type="submit" class="btn btn-info">Delete</button> </a>
                             <a href="<?php echo e(url('company-more',$company->id)); ?>"><button type="submit" class="btn btn-info">More</button> </a>
                              
                        </td>       
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
         </table>   
    </div>



<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/1.13.1/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/dataTables.buttons.min.js
"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js
"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/buttons.html5.min.js"></script>
<script type="text/javascript" src="https://cdn.datatables.net/buttons/2.3.2/js/buttons.print.min.js"></script>


 <script type="text/javascript">  
    $(document).ready(function() {
    $('#tabl').DataTable( {
        dom: 'Bfrtip',
        ordering:false,
        buttons: [
             'csv', 'excel', 'pdf', 'print'
        ]
        
    } );
} );
    
</script>
<script type="text/javascript">
       $("document").ready(function(){
        setTimeout(function()
        {
            $("div.alert").remove();

        }, 3000);

       });

</script>
</main>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('frontend.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\CRM\resources\views/frontend/components-view.blade.php ENDPATH**/ ?>