@extends('layouts.app') @section('title', 'Employee Directory') @section('breadcrumbs') @endsection @section('content')
{{-- Page Header --}}

Employee Directory

{{ $stats['total'] }} employees in your organization

@role('company_admin') Export Add Employee @endrole
{{-- Stats Row --}}
{{ $stats['total'] }}
Total Employees
{{ $stats['active'] }}
Active
{{ $stats['on_probation'] }}
On Probation
{{ $stats['inactive'] }}
Inactive
{{-- Toolbar --}}
@if(request()->hasAny(['search', 'department_id', 'designation_id', 'status'])) Clear @endif
{{-- View Toggle --}}
View: {{ $employees->total() }} result(s)
{{-- Table View --}}
@if($employees->count() > 0)
@foreach($employees as $employee) @endforeach
Employee Code Department Designation Joining Date Status Actions
@if($employee->profile_photo) {{ $employee->full_name }} @else
{{ $employee->initials }}
@endif
{{ $employee->full_name }}
{{ $employee->user?->email }}
{{ $employee->employee_code }} {{ $employee->department?->name ?? '—' }} {{ $employee->designation?->name ?? '—' }} {{ $employee->joining_date->format('d M Y') }} {{ $employee->status_label }}
@role('company_admin') @endrole
{{ $employees->withQueryString()->links() }}
@else @include('layouts.components.empty-state', [ 'icon' => '', 'title' => 'No employees found', 'message' => request()->hasAny(['search', 'department_id', 'designation_id', 'status']) ? 'Try adjusting your search or filters.' : 'Start by onboarding your first employee.', 'action_url' => auth()->user()->role === 'company_admin' ? route('employees.create') : null, 'action_label' => 'Add Employee', ]) @endif
{{-- Card View --}}
@if($employees->count() > 0)
{{ $employees->withQueryString()->links() }}
@endif
@endsection