<div class="table-responsive">
    <table class="table table-hover manage-u-table">
        <thead>
            <tr>
                <th>#</th>
                <th><?php echo app('translator')->getFromJson('employee.photo'); ?></th>
                <th><?php echo app('translator')->getFromJson('employee.name'); ?></th>
                <th><?php echo app('translator')->getFromJson('employee.department'); ?></th>
                <th><?php echo app('translator')->getFromJson('employee.phone'); ?></th>
                <th><?php echo app('translator')->getFromJson('employee.finger_print_no'); ?></th>
                <th><?php echo app('translator')->getFromJson('paygrade.pay_grade_name'); ?></th>
                <th><?php echo app('translator')->getFromJson('employee.date_of_joining'); ?></th>
                <th><?php echo app('translator')->getFromJson('common.status'); ?></th>
                <th><?php echo app('translator')->getFromJson('common.action'); ?></th>
            </tr>
        </thead>
        <tbody>
            <?php echo $sl = null; ?>

            <?php $__currentLoopData = $results; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr class="<?php echo $value->employee_id; ?>">
                    <td style="width: 100px;"><?php echo ++$sl; ?></td>
                    <td>
                        <?php if($value->photo != '' && file_exists('uploads/employeePhoto/' . $value->photo)): ?>
                            <a href="<?php echo route('employee.show', $value->employee_id); ?>"><img style=" width: 70px; " src="<?php echo asset('uploads/employeePhoto/' . $value->photo); ?>"
                                    alt="user-img" class="img-circle"></a>
                        <?php else: ?>
                            <a href="<?php echo route('employee.show', $value->employee_id); ?>"> <img style=" width: 70px; " src="<?php echo asset('admin_assets/img/default.png'); ?>"
                                    alt="user-img" class="img-circle"></a>
                        <?php endif; ?>
                    </td>
                    <td>
                        <span class="font-medium">
                            <a href="<?php echo route('employee.show', $value->employee_id); ?>"><?php echo $value->first_name; ?>&nbsp;<?php echo $value->last_name; ?></a>
                        </span>
                        <br /><span class="text-muted"><?php echo app('translator')->getFromJson('employee.role'); ?> :
                            <?php if(isset($value->userName->role->role_name)): ?>
                                <?php echo $value->userName->role->role_name; ?>

                            <?php endif; ?>
                        </span>
                        <br /><span class="text-muted">
                            <?php if(isset($value->supervisor->first_name)): ?>
                                <?php echo app('translator')->getFromJson('employee.supervisor'); ?> : <?php echo $value->supervisor->first_name; ?> <?php echo $value->supervisor->last_name; ?>

                            <?php endif; ?>
                        </span>
                    </td>
                    <td>
                        <span class="font-medium">
                            <?php if(isset($value->department->department_name)): ?>
                                <?php echo $value->department->department_name; ?>

                            <?php endif; ?>
                        </span>
                        <br /><span class="text-muted"><?php echo app('translator')->getFromJson('employee.designation'); ?> :
                            <?php if(isset($value->designation->designation_name)): ?>
                                <?php echo $value->designation->designation_name; ?>

                            <?php endif; ?>
                        </span>
                        <br /><span class="text-muted">
                            <?php if(isset($value->branch->branch_name)): ?>
                                <?php echo app('translator')->getFromJson('branch.branch_name'); ?> : <?php echo $value->branch->branch_name; ?>

                            <?php endif; ?>
                        </span>

                    </td>
                    <td>
                        <span class="font-medium">
                            <?php echo e($value->phone); ?>

                        </span>
                        <br /><span class="text-muted">
                            <?php if($value->email != ''): ?>
                                <?php echo app('translator')->getFromJson('employee.email'); ?> :<?php echo $value->email; ?>

                            <?php endif; ?>
                        </span>
                    </td>
                    <td>
                        <span class="font-medium">
                            <?php echo $value->finger_id; ?>

                    </td>
                    </span>
                    <td>
                        <span class="font-medium">
                            <?php if(isset($value->payGrade->pay_grade_name)): ?>
                                <?php echo $value->payGrade->pay_grade_name; ?> <span class="bdColor">(<?php echo app('translator')->getFromJson('employee.monthly'); ?>)</span>
                            <?php endif; ?>
                            <?php if(isset($value->hourlySalaries->hourly_grade)): ?>
                                <?php echo $value->hourlySalaries->hourly_grade; ?> <span class="bdColor">(<?php echo app('translator')->getFromJson('employee.hourly'); ?>)</span>
                            <?php endif; ?>
                        </span>
                    </td>
                    <td>
                        <span class="font-medium">
                            <?php echo e(dateConvertDBtoForm($value->date_of_joining)); ?>

                        </span>
                        <br /><span class="text-muted">
                            <?php echo e(\Carbon\Carbon::parse($value->date_of_joining)->diffForHumans()); ?>

                        </span>
                        <br /><span class="text-muted">
                            <?php echo app('translator')->getFromJson('employee.job_status'); ?>: <?php if($value->permanent_status == 0): ?>
                                <?php echo app('translator')->getFromJson('employee.probation_period'); ?>
                            <?php else: ?>
                                <?php echo app('translator')->getFromJson('employee.permanent'); ?>
                            <?php endif; ?>
                        </span>
                    </td>
                    <td>
                        <?php if($value->status == 1): ?>
                            <span class="label label-success"><?php echo app('translator')->getFromJson('common.active'); ?></span>
                            </span>
                        <?php elseif($value->status == 2): ?>
                            <span class="label label-warning"><?php echo app('translator')->getFromJson('common.inactive'); ?></span>
                        <?php else: ?>
                            <span class="label label-danger"><?php echo app('translator')->getFromJson('common.terminated'); ?></span>
                        <?php endif; ?>
                    </td>

                    <td style="width: 150px">
                        <a title="Profile" href="<?php echo route('employee.show', $value->employee_id); ?>" class="btn btn-primary btn-xs btnColor">
                            <i class="glyphicon glyphicon-th-large" aria-hidden="true"></i>
                        </a>
                        <a href="<?php echo route('employee.edit', $value->employee_id); ?>" class="btn btn-success btn-xs btnColor">
                            <i class="fa fa-pencil-square-o" aria-hidden="true"></i>
                        </a>
                        <a href="<?php echo route('employee.delete', $value->employee_id); ?>" data-token="<?php echo csrf_token(); ?>"
                            data-id="<?php echo $value->employee_id; ?>"
                            class="delete btn btn-danger btn-xs deleteBtn btnColor"><i class="fa fa-trash-o"
                                aria-hidden="true"></i></a>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
    <div class="text-center">
        <?php echo e($results->links()); ?>

    </div>
</div>
