<?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>Roles</h4>

            </div>

        </div>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('role.create')): ?>
        <div class="col-sm-6 p-md-0 justify-content-sm-end mb-2 mt-sm-0 d-flex">
            
            <a href="<?php echo e(route('seller.role.create')); ?>">

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

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

                </button>

            </a>
            
        </div>
        <?php endif; ?>

    </div>

    <div class="container-fluid">

        <?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>S.No</th>
                                        <th>Role</th>
                                        <th>Action</th>
                                    </tr>
                                
                                </thead>

                                <tbody>
                                    <?php if(!empty($roles)): ?>
                                        <?php $__currentLoopData = $roles; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=>$value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                            <tr>
                                                <td><?php echo e(++$key); ?></td>
                                                <td><?php echo e(str_replace('_','',str_replace(Auth::user()->company_id,'',$value->name))); ?></td>
                                                <td>
                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('role.permission')): ?>
                                                    <a href="<?php echo e(route('seller.role.permissions',$value->id)); ?>" class="color-green" title="Assign Permission" alt="Assign Permission">

                                                        <i class="fas fa-gear"></i>

                                                    </a>
                                                    |
                                                    <?php endif; ?>

                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('role.edit')): ?>
                                                    <a href="<?php echo e(route('seller.role.permissions',$value->id)); ?>" class="color-green" title="Edit" alt="Edit">
                                                    
                                                        <i class="fas fa-edit"></i> 
                                                        
                                                    </a>
                                                    |
                                                    <?php endif; ?>

                                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('role.delete')): ?>
                                                    <a href="<?php echo e(url('deleterole/'.$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>

<?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/backend/company/roles/index.blade.php ENDPATH**/ ?>