Departments and entities

Overview
The /departments route renders the department/entity management interface.
- Route:
/departments(protected) - Source:
front/src/pages/DepartmentManagement.tsx
User actions
The page loads entity and department lists and provides create, edit, and delete flows for both entities and departments. The page uses form state and confirmation state for destructive actions.
APIs and data flow
- Load:
GET /entitiesandGET /departments. - Entity mutations:
POST /entities,PUT /entities/:id,DELETE /entities/:id. - Department mutations:
POST /departments,PUT /departments/:id,DELETE /departments/:id. - After successful actions, page state is refreshed according to its handlers.
Exact backend constraints and response schemas are not available from frontend source.
Source: front/src/pages/DepartmentManagement.tsx, front/src/services/api/entityService.ts.