@extends('layouts.app') @section('title', 'Company Departments: ' . $company->name) @section('content')
Back to Company

Departments: {{ $company->name }}

@can('admin.departments.create') Add Department @endcan

Departments ({{ $departments->total() }})

Active: {{ $departments->where('is_active', true)->count() }} | Inactive: {{ $departments->where('is_active', false)->count() }}
@forelse($departments as $department) @empty @endforelse
Name Code Head of Department HSE Officer Users Status Actions
{{ $department->name }}
@if($department->description)
{{ Str::limit($department->description, 50) }}
@endif
{{ $department->code ?? 'N/A' }}
{{ $department->headOfDepartment->name ?? 'N/A' }}
{{ $department->hseOfficer->name ?? 'N/A' }}
{{ $department->users()->count() }}
@if($department->is_active) Active @else Inactive @endif
@can('admin.departments.view') @endcan @can('admin.departments.edit') @endcan
No departments found for this company.
@if($departments->hasPages())
{{ $departments->links() }}
@endif
@endsection