

<?php $__env->startSection('title','User'); ?>

<?php $__env->startSection('content'); ?>
    <!-- Content Header (Page header) -->
    <div class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1 class="m-0 text-dark">Manage  User  </h1>
                </div><!-- /.col -->
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="#">Settings</a></li>
                        <li class="breadcrumb-item active">Manage User  </li>
                    </ol>
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div><!-- /.container-fluid -->
    </div>
    <!-- /.content-header -->


    <!-- Main content -->
    <section class="content">
        <div class="col-lg-12">
            <div class="row">
                <div class="col-md-12">
                    <div class="card card-warning card-outline">
                        <div class="card-header">
                            <div class="card-title">
                                <h5 class="text-info">Inventory User list </h5>
                                <p> <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#myModal">
                                    Add New User
                                  </button></p>
                            </div>

                            <div class="card-tools">
                                <button type="button" class="btn btn-tool" data-widget="collapse">
                                    <i class="fas fa-minus"></i>
                                </button>
                            </div>
                            <!-- /.card-tools -->
                        </div>
                        <!-- /.card-header -->
                        <div class="card-body" style="display: block;">
                            <table class="table table-bordered table-striped" id="productTable">
                                <thead>
                                <tr>
                                    <th>SL</th>
                                    <th>Name</th>
                                    
                                    <th>Email </th>
                                    
                                    <th>Image </th>
                                    <th>Roles</th>
                                    <th>Action</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php $i=0; ?>
                                <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $info): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr id="rowid<?php echo e($info->id); ?>" class="abcd">
                                        <td><?php echo e(++$i); ?></td>
                                        <td id="name<?php echo e($info->id); ?>" data-id="<?php echo e($info->name); ?>"><?php echo e($info->name); ?></td>
                                        <td id="email<?php echo e($info->id); ?>" data-id="<?php echo e($info->email); ?>"><?php echo e($info->email); ?></td>
                                        <td id="image<?php echo e($info->id); ?>" data-id="<?php echo e($info->image); ?>"><img src="<?php echo e(asset('public/admin/User/upload/'.$info->image)); ?>" style="height: 60px;width: 60px;"></td>
                                        <td id="roles<?php echo e($info->id); ?>" data-id="<?php echo e($info->roles); ?>">
                                            <ul>
                                                <?php $__empty_1 = true; $__currentLoopData = $info->roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $role): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                                                        <li><?php echo e($role->name); ?></li>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                                                    
                                                <?php endif; ?>
                                            </ul>
                                        </td>
                                        <td>
                                            <?php if(canSee(Auth::user()->roles,'user.edit')): ?>
                                            <a class="btn btn-sm btn-info edit" data-id="<?php echo e($info->id); ?>" href="<?php echo e(route('user.edit',$info->id)); ?>"><i class="fa fa-pen"></i></a><?php endif; ?> ||
                                            <button class="btn btn-sm btn-danger erase" data-id="<?php echo e($info->id); ?>" data-url="<?php echo e(url('User/erase')); ?>">
                                                <i class="fa fa-trash"></i>
                                            </button>
                                        </td>
                                    </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                </tbody>
                            </table>
                        </div>
                        <!-- /.card-body -->
                    </div>
                </div>
                

            </div>
        
</section><!-- /.content --> 
<?php $__env->stopSection(); ?>

<?php $__env->startSection('style'); ?>
    <!-- DataTables -->
    <link rel="stylesheet" href="<?php echo e(asset('plugins/datatables/dataTables.bootstrap4.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('plugin'); ?>
    <!-- DataTables -->
    <script src="<?php echo e(asset('plugins/datatables/jquery.dataTables.js')); ?>"></script>
    <script src="<?php echo e(asset('plugins/datatables/dataTables.bootstrap4.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
    <!-- page script -->
    <script type="text/javascript">
        var table;
        $(document).ready(function () {
            $('#productTable').dataTable();
        });
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.fixed', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/welluugs/purchase.wellgrouperp.com/resources/views/employee/add-employee.blade.php ENDPATH**/ ?>