@extends('layouts.app') @section('title', 'Department Details') @section('content')
Back to Departments

{{ $department->name }}

Department Information

{{ $department->code }}

{{ $department->company->name }}

{{ $department->location }}

@if($department->is_active) Active @else Inactive @endif

{{ $department->description }}

Key Personnel

@if($department->headOfDepartment)

{{ $department->headOfDepartment->name }}

{{ $department->headOfDepartment->email }}

@else

Not assigned

@endif
@if($department->hseOfficer)

{{ $department->hseOfficer->name }}

{{ $department->hseOfficer->email }}

@else

Not assigned

@endif

HSE Objectives

@if($department->hse_objectives) @else

No HSE objectives defined

@endif

Employees

{{ $department->employees->count() }}

Incidents

{{ $department->incidents->count() }}

Toolbox Talks

{{ $department->toolboxTalks->count() }}

Sub-departments

{{ $department->childDepartments->count() }}

@if($department->childDepartments->count() > 0)

Sub-departments

@foreach($department->childDepartments as $child)

{{ $child->name }}

{{ $child->code }}

@endforeach
@endif @if($department->employees->count() > 0)

Department Employees

@foreach($department->employees->take(10) as $employee) @endforeach
Name Email Role Status
{{ $employee->name }}
{{ $employee->email }}
{{ $employee->role->display_name ?? 'N/A' }}
@if($employee->is_active) Active @else Inactive @endif
@if($department->employees->count() > 10)

Showing 10 of {{ $department->employees->count() }} employees

@endif
@endif
@endsection