<?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">

             <h4>Users</h4>

        </div>

    </div>
    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user.create')): ?>
    <div class="col-sm-6 p-md-0 justify-content-sm-end mt-2 mt-sm-0 d-flex">

        <a href="<?php echo e(route('seller.user.create')); ?>">

            <button type="button" class="btns success-btn btn-sm">

                <i class="fas fa-plus"></i> Add User

            </button>

        </a>

    </div>
    <?php endif; ?>

</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>NAME</th>

                                    <th>EMAIL</th>

                                    <th>MOBILE</th>

                                    <th>Role</th>
                                    
                                    <th>STATUS</th>

                                    <th>ACTION</th>

                                </tr>

                            </thead>

                            <tbody>
                                <?php if(!empty($users)): ?>
                                    <?php $__currentLoopData = $users; $__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->email); ?></td>
                                        <td><?php echo e($value->mobile); ?></td>
                                        <td><?php echo e($value->role); ?></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 >
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user.view')): ?>
                                            <a href="<?php echo e(route('seller.user.view',encrypt($value->id))); ?>" title="View More" alt="View More" class="color-green">
                                                <i class="fas fa-eye"></i> 
                                            </a> | 
                                            <?php endif; ?>
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user.edit')): ?>
                                            <a href="<?php echo e(route('seller.user.edit',encrypt($value->id))); ?>" title="Edit" alt="Edit" class="color-green">
                                               
                                                    <i class="fas fa-edit"></i> 
                                               
                                            </a> | 
                                            <?php endif; ?>
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('user.delete')): ?>
                                            <a href="<?php echo e(route('seller.user.delete',encrypt($value->id))); ?>" onclick="return confirm('Are you sure delete this?')" title="Delete" alt="Delete" class="color-green">
                                               
                                                    <i class="fas fa-trash-alt"></i>
                                                
                                            </a>
                                            <?php endif; ?>

                                        </td>

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

                            </tbody>

                        </table>

                    </div>

                </div>

            </div>

        </div>

    </div>

</div>
</main><!-- End #main -->

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

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