@extends('layouts.dashboard') @section('title', 'Edit Department') @section('content')
Back to Departments

Edit Department

Update department information

Edit {{ $department->name }}

Update the department details

{{ ucfirst($department->status) }}
@csrf @method('PUT')
@error('name')

{{ $message }}

@enderror
@error('description')

{{ $message }}

@enderror

Optional description for the department

{{ strlen($department->description) }} characters
@error('status')

{{ $message }}

@enderror
Active: Department is operational and visible
Inactive: Department is archived and not visible in assignments

Fields marked with * are required

Cancel

Danger Zone

Deleting this department will permanently remove it from the system. @if($department->users()->count() > 0) Cannot delete: This department has {{ $department->users()->count() }} employees. @endif

@if($department->users()->count() == 0)
@csrf @method('DELETE')
@else

Reassign all employees to other departments first

@endif
@endsection