<?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(); ?>

<div class="row page-titles mx-0">

    <div class="col-sm-6 p-md-0">

        <div class="breadcrumb-range-picker">

             <h3>Company</h3>

        </div>

    </div>

</div>

<div class="container-fluid" style="margin-top: 15px">

    <?php echo $__env->make('flash_msg', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>

    <div class="row">

        <div class="col-12">

            <div class="card">

                <div class="card-body">

                    <div class="table-responsive">

                        <table class="table table-border table-hover table-sm" id="tabl">
                            <thead>

                                <tr>

                                    <th>#</th>

                                    <th>Company</th>

                                    <th>Owner</th>

                                    <th>Location</th>

                                    <th>GST</th>

                                    <th>Status</th>

                                    <th>Action</th>



                                </tr>

                            </thead>

                            <tbody>
                                <?php if(!empty($datas)): ?>
                                    <?php $__currentLoopData = $datas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                     <tr>
                                       <td> <?php echo e(++$key); ?> </td>
                                       <td> <?php echo e($value->name); ?> </td>
                                       <td> <?php echo e($value->user?$value->user->name:''); ?> </td>
                                       <td> 
                                            <small>
                                                City : <?php echo e($value->city_info->name ?? 'No City'); ?> <br>
                                                State : <?php echo e($value->state_info->name ?? 'No State'); ?> <br>
                                                Country : <?php echo e($value->country_info->name ?? 'No Country'); ?> 
                                            </small>
                                       </td>
                                       <td> <?php echo e($value->GST); ?> </td>

                                        <td>
                                        <?php if($value->status=='1'): ?>

                                            <a href="<?php echo e(url('customeractive/'.$value->id)); ?>">

                                                <button class="btns success-btn btn-sm">Active</button>
                                            </a>
                                            <?php else: ?>
                                            <a href="<?php echo e(url('customeractive/'.$value->id)); ?>">

                                                <button class="btn btn-danger btn-sm">InActive</button>
                                            </a>
                                            <?php endif; ?>
                                        </td>

                                        <td class="text-right">

                                            <a href="<?php echo e(url('company/'.$value->id)); ?>">
                                                <button type="button" class="btns success-btn btn-sm" title="View More" alt="View More">
                                                    <i class="fas fa-eye"></i> 
                                                </button>
                                            </a>


                                             <!-- <a href="<?php echo e(url('company/'.$value->id.'/edit')); ?>">
                                            <button type="button" class="btns success-btn btn-sm" title="Edit" alt="Edit"><i class="fas fa-edit"></i> 
                                            </button>
                                             </a> -->

                                            <a href="<?php echo e(route('customer.delete',encrypt($value->id))); ?>" onclick="return confirm('Are you sure?')">
                                            <button type="button" class="btns success-btn btn-sm" title="Delete" alt="Delete"><i class="fas fa-trash-alt"></i>
                                            </button>
                                            </a>

                                        </td>

                                     </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                <?php endif; ?>

                               </tbody>

                            <tfoot>

                                <tr>

                                    <th>#</th>

                                    <th>Company</th>

                                    <th>Owner</th>

                                    <th>Location</th>

                                    <th>GST</th>

                                    <th>Status</th>

                                    <th>Action</th>

                                </tr>


                            </tfoot>

                        </table>

                    </div>

                </div>

            </div>

        </div>

    </div>

</div>
</main><!-- End #main -->
<script type="text/javascript">
   $(document).ready(function () {
    var table = $('#tabl').DataTable({
      
      responsive: true
    });

    new $.fn.dataTable.FixedHeader( table );
});
</script>
<script type="text/javascript">
       $("document").ready(function(){
        setTimeout(function()
        {
            $("div.alert").remove();

        }, 3000);

       });

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

<?php echo $__env->make('frontend.layouts.main', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/vinecork/public_html/webdev/Company/resources/views/backend/company/index.blade.php ENDPATH**/ ?>