<?php $__env->startSection('css'); ?>
<link href="<?php echo e(URL::asset('assets/plugins/datatable/css/dataTables.bootstrap4.min.css')); ?>" rel="stylesheet" />
<link href="<?php echo e(URL::asset('assets/plugins/datatable/css/buttons.bootstrap4.min.css')); ?>" rel="stylesheet">
<link href="<?php echo e(URL::asset('assets/plugins/datatable/css/responsive.bootstrap4.min.css')); ?>" rel="stylesheet" />
<link href="<?php echo e(URL::asset('assets/plugins/datatable/css/jquery.dataTables.min.css')); ?>" rel="stylesheet">
<link href="<?php echo e(URL::asset('assets/plugins/datatable/css/responsive.dataTables.min.css')); ?>" rel="stylesheet">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('title'); ?>
    Employees
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
<!-- row opened -->
<div class="row row-sm">
    <!--div-->
    <div class="col-xl-12">
        <div class="card mg-b-20">
            <div class="card-header pb-0">
                <div class="d-flex justify-content-between">
                    <h4 class="card-title mg-b-0"><?php echo e(trans('employees.employees')); ?></h4>
                    <div class="btn btn-primary"><a class="text-white" href="<?php echo e(route('employees.create')); ?>"><?php echo e(trans('employees.add_new_employee')); ?></a></div>
                </div>

                <h5><?php echo e(trans('employees.import_employees')); ?></h5>
                <div class="col-md-4">
                    <form action="<?php echo e(route('import_employees')); ?>" method="POST" enctype="multipart/form-data">
                        <?php echo csrf_field(); ?>
                        <input type="file" name="file" class="form-control">
                        <br>
                        <button class="btn btn-success"><?php echo e(trans('employees.import_employees')); ?></button>
                    </form>
                </div>

            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table id="example" class="table key-buttons text-md-nowrap">
                        <thead>
                            <tr>
                                <th class="border-bottom-0"><?php echo e(trans('employees.the_id')); ?></th>
                                <th class="border-bottom-0"><?php echo e(trans('employees.image')); ?></th>
                                <th class="border-bottom-0"><?php echo e(trans('dashboard.name')); ?></th>
                                <th class="border-bottom-0"><?php echo e(trans('employees.email')); ?></th>
                                <th class="border-bottom-0"><?php echo e(trans('employees.position')); ?></th>
                                <th class="border-bottom-0"><?php echo e(trans('employees.sector')); ?></th>
                                <th class="border-bottom-0"><?php echo e(trans('employees.extension')); ?></th>
                                <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(['edit_employee', 'delete_employee'])): ?>
                                    <th class="border-bottom-0"><?php echo e(trans('dashboard.actions')); ?></th>
                                <?php endif; ?>
                                <th class="border-bottom-0"><?php echo e(trans('dashboard.created')); ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php $__currentLoopData = $users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <tr>
                                    <td><?php echo e($user->the_id); ?></td>
                                    <td><img width="50" height="50" src="<?php echo e($user->img_path); ?>" alt="" srcset=""></td>
                                    <td><?php echo e($user->{'name_' . $locale}); ?></td>
                                    <td><?php echo e($user->email); ?></td>
                                    <td><?php echo e($user->position->name); ?></td>
                                    <td><?php echo e($user->sector->name); ?></td>
                                    <td><?php echo e($user->extension->name); ?></td>
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->any(['edit_employee', 'delete_employee'])): ?>
                                        <td class="row pl-3">
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('edit_employee')): ?>
                                                <a href="<?php echo e(route('employees.edit', $user->id)); ?>" class="btn btn-warning"><?php echo e(trans('dashboard.edit')); ?></a>
                                            <?php endif; ?>
                                            &nbsp;&nbsp;
                                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('delete_employee')): ?>
                                                <form class="pl-3" action="<?php echo e(route('employees.destroy', $user->id)); ?>" method="post">
                                                    <?php echo csrf_field(); ?>
                                                    <?php echo method_field('DELETE'); ?>
                                                    <button class="btn btn-danger" type="submit"><?php echo e(trans('dashboard.delete')); ?></button>
                                                </form>
                                            <?php endif; ?>
                                        </td>
                                    <?php endif; ?>
                                    <td><?php echo e($user->created_at->diffForHumans()); ?></td>
                                </tr>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <!--/div-->
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('js'); ?>
<!-- Internal Data tables -->
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/dataTables.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/dataTables.responsive.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/responsive.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/jquery.dataTables.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/dataTables.bootstrap4.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/dataTables.buttons.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/buttons.bootstrap4.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/jszip.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/pdfmake.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/vfs_fonts.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/buttons.html5.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/buttons.print.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/buttons.colVis.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/dataTables.responsive.min.js')); ?>"></script>
<script src="<?php echo e(URL::asset('assets/plugins/datatable/js/responsive.bootstrap4.min.js')); ?>"></script>
<!--Internal  Datatable js -->
<script src="<?php echo e(URL::asset('assets/js/table-data.js')); ?>"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /Users/valu/Documents/GitHub/ABC-IDP/resources/views/admin/users/index.blade.php ENDPATH**/ ?>