@php $activeDepartments = $departmentStats['active'] ?? 0; $totalDepartments = $departmentStats['total'] ?? 0; $statusStyles = [ 'active' => 'bg-emerald-50 text-emerald-700', 'inactive' => 'bg-amber-50 text-amber-700', 'archived' => 'bg-secondary-100 dark:bg-secondary-900/60 text-secondary-600 dark:text-secondary-300', ]; @endphp
Import departments Export New department

Total departments

{{ $totalDepartments }}

Active departments

{{ $activeDepartments }}

@forelse($departments as $department) @empty @endforelse
Name Status Created Actions
{{ $department->name }} @php $status = (string) ($department->status?->value ?? $department->status ?? ''); $statusClass = $statusStyles[$status] ?? 'bg-secondary-100 dark:bg-secondary-900/60 text-secondary-600 dark:text-secondary-300'; @endphp {{ $status ?: 'unknown' }} {{ $department->created_at?->format('M j, Y') ?? '—' }}
Edit Delete
No departments yet.
{{ $departments->links() }}