@extends('layouts.app') @section('title', 'Department Details') @section('subtitle', 'View department information and employees') @section('content')
Back to Departments

{{ $department->name }}

{{ $department->department_head ?? 'No head assigned' }}

Cost Center: {{ $department->cost_center ?? 'N/A' }}

Edit
@csrf @method('DELETE')

Department Information

{{ $department->name }}

{{ $department->department_head ?? 'Not assigned' }}

{{ $department->cost_center ?? 'Not set' }}

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

{{ $department->description }}

@endif

Department Employees ({{ $department->users->count() }})

@if($department->users->count() > 0)
@foreach($department->users as $user)
@if($user->image) {{ $user->first_name }} @else
{{ $user->initials }}
@endif

{{ $user->full_name }}

{{ $user->employee_id }} • {{ $user->position }}

{{ ucfirst($user->status) }}
@endforeach
@else

No employees assigned to this department

@endif

Quick Stats

Total Employees {{ $department->users->count() }}
Active Employees {{ $department->users->where('status', 'active')->count() }}
Vehicles {{ $department->vehicles->count() }}

Quick Actions

Add Employee

Recent Activity

{{ $department->users->where('created_at', '>=', now()->subDays(30))->count() }} new employees this month
Last updated: {{ $department->updated_at->diffForHumans() }}
@endsection