@extends('layouts.app') @section('title', __('Employees')) @section('content') @php($tabs = ['all' => __('All'), 'employee' => __('Employees'), 'team_lead' => __('Team leads'), 'department_head' => __('Department heads'), 'hr' => 'HR', 'admin' => __('Admins')])

{{ __('Employees') }}

{{ __('Everyone who can sign in or be reviewed, with their reporting line.') }}

{{ __('Add employee') }}
@foreach ($tabs as $key => $label) {{ $label }} @endforeach
@if ($employees->isEmpty()) @else
@foreach ($employees as $e) @endforeach
{{ __('Name') }}{{ __('Code') }}{{ __('Role') }}{{ __('Department') }} {{ __('Team lead') }}{{ __('Department head') }}HR{{ __('Status') }}{{ __('Actions') }}
{{ $e->name }}{{ $e->email }}
{{ $e->employee_code }}
{{ $e->role->label() }} @if ($e->is_admin){{ __('Admin') }}@endif
{{ $e->department?->name ?? '—' }} {{ $e->teamLead?->name ?? '—' }} {{ $e->departmentHead?->name ?? '—' }} {{ $e->hrReviewer?->name ?? '—' }} {{ $e->is_active ? __('Active') : __('Inactive') }}
{{ __('Edit') }} @if ($e->id !== auth()->id())
@csrf
@endif
{{ $employees->links() }} @endif
@if ($drawer) @php($d = $drawer) @php($close = route('admin.employees.index', request()->only('role', 'q', 'page')))
@error('is_admin')@enderror
{{ __('Reporting line: who reviews this person. Set all three, or none if they are not appraised.') }}
{{ __('Cancel') }}
@endif @endsection