<?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key=> $row): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(auth()->user()->role == 'super_admin' && $row->role == 'super_admin' && auth()->user()->id != 1 && auth()->user()->id != $row->id): ?>
    <?php continue; ?>
<?php endif; ?>
<tr>
    <th scope="row">
        <?php if($row->role == 'sub_admin'): ?>
            <?php if(auth()->user()->id != $row->id): ?>
                <div class="custom-control custom-checkbox">
                    <input type="checkbox" class="custom-control-input selectOne deleteCheck" id="customCheck<?php echo e($row->id); ?>" value="<?php echo e($row->id); ?>" name="id[]">
                    <label class="custom-control-label" for="customCheck<?php echo e($row->id); ?>"></label>
                </div>
            <?php endif; ?>
        <?php endif; ?>

    </th>
    <td><?php echo e($row->name); ?></td>
    <td><?php echo e($row->email); ?></td>
    <td><?php echo e(__('users.'.$row->role)); ?></td>
    <td colspan="2"><?php echo e(\Carbon\Carbon::parse($row->created_at)->format('Y/m/d')); ?></td>
    <td>
        <?php if($row->role == 'super_admin' && $row->id == 1): ?>
            <a href="<?php echo e(route ('users.edit', $row->id)); ?>" class="icon" title="<?php echo e(__('dashboard.edit')); ?>"><img src="<?php echo e(asset('assets/admin/images/icons/draw.svg')); ?>" alt="<?php echo e(__('dashboard.edit')); ?>"></a>
        <?php else: ?>

            <?php if($row->deleted_at): ?>
                <?php if($row->role == 'sub_admin' || (auth()->user()->role == 'super_admin' && $row->role == 'super_admin' && $row->id != 1)): ?>
                    <a href="<?php echo e(route ('users.restore', $row->id)); ?>" data-method="put" class="icon rowAction" title="<?php echo e(__('dashboard.restore')); ?>"><img src="<?php echo e(asset('assets/admin/images/icons/restore.svg')); ?>" alt="<?php echo e(__('dashboard.restore')); ?>"></a>
                    <?php if(auth()->user()->id != $row->id): ?>
                        <a href="<?php echo e(route ('users.destroy', $row->id)); ?>" data-method="delete" class="icon rowAction" title="<?php echo e(__('dashboard.delete')); ?>"><img src="<?php echo e(asset('assets/admin/images/icons/close.svg')); ?>" alt="<?php echo e(__('dashboard.delete')); ?>"></a>
                    <?php endif; ?>
                <?php endif; ?>

            <?php else: ?>
                <a href="<?php echo e(route ('users.edit', $row->id)); ?>" class="icon" title="<?php echo e(__('dashboard.edit')); ?>"><img src="<?php echo e(asset('assets/admin/images/icons/draw.svg')); ?>" alt="<?php echo e(__('dashboard.edit')); ?>"></a>
                <?php if($row->role == 'sub_admin' || (auth()->user()->role == 'super_admin' && $row->role == 'super_admin' && $row->id != 1)): ?>
                    <?php if(auth()->user()->id != $row->id): ?>
                        <a href="<?php echo e(route ('users.destroy', $row->id)); ?>" data-method="delete" class="icon rowAction" title="<?php echo e(__('dashboard.trash')); ?>"><img src="<?php echo e(asset('assets/admin/images/icons/del.svg')); ?>" alt="<?php echo e(__('dashboard.trash')); ?>"></a>
                    <?php endif; ?>
                <?php endif; ?>
            <?php endif; ?>
        <?php endif; ?>
    </td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

<?php if( count( $users ) && $users->hasPages() ): ?>
<tr> <td></td><td> <?php echo e($users->links()); ?> </td> </tr>
<?php endif; ?>
<?php /**PATH /home/cupncone/public_html/cms/resources/views/admin/users/grid.blade.php ENDPATH**/ ?>