@extends('layouts.app') @section('content')
{{-- Header Section --}}

Department Management

Organize your workforce by departments

+ New Department
{{-- Stats Cards --}}

Total Departments

{{ $stats['total'] }}

Active

{{ $stats['active'] }}

Inactive

{{ $stats['inactive'] }}

Total Employees

{{ $stats['total_employees'] }}

{{-- Departments Table --}}
@forelse($departments as $department) @empty @endforelse
Department Info Manager Employees Status Action
{{ substr($department->name, 0, 1) }}
{{ $department->name }} Code: {{ $department->code }}
{{ $department->manager->name ?? 'Unassigned' }} {{ $department->employees->count() }} {{ ucfirst($department->status) }}
@csrf @method('DELETE')

No Departments Found

Create your first department to organize your workforce

+ Create Department
{{-- Pagination --}} @if($departments->hasPages())
{{ $departments->links() }}
@endif
@endsection