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

Departments

Manage company departments and hierarchy

Add Department
{{-- Search --}}
@if(request('search')) Clear @endif
{{-- Table --}}
@if($departments->count() > 0)
@foreach($departments as $department) @endforeach
Name Code Head Parent Employees Status Actions
{{ $department->name }} {{ $department->code ?? '—' }} @if($department->head)
{{ $department->head->initials }}
{{ $department->head->full_name }}
@else @endif
{{ $department->parent?->name ?? '—' }} {{ $department->employees_count }} {{ $department->is_active ? 'Active' : 'Inactive' }}
{{ $departments->withQueryString()->links() }}
@else @include('layouts.components.empty-state', [ 'icon' => '', 'title' => 'No departments yet', 'message' => 'Create your first department to organize your workforce.', 'action_url' => route('departments.create'), 'action_label' => 'Add Department', ]) @endif
{{-- Delete Confirmation Modal --}}
@endsection