Evaluaciones
Evaluaciones de rendimiento
Modelo
interface Evaluation { id: string; employee_id: string; reviewer_id: string; // Quién evalúa (normalmente el jefe directo) period: string; // "2026-H1" (primer semestre) evaluation_date: string; status: 'draft' | 'in_progress' | 'completed' | 'shared'; overall_rating: 1 | 2 | 3 | 4 | 5; // 1=muy pobre, 5=excepcional items: EvaluationItem[]; strengths: string; areas_for_improvement: string; goals_for_next_period: string; employee_comments?: string; shared_with_employee: boolean; created_at: string;}
interface EvaluationItem { category: string; // "Rendimiento", "Comunicacion", "Liderazgo" item: string; // "Calidad del trabajo", "Puntualidad" rating: 1 | 2 | 3 | 4 | 5; comment?: string;}Flujo de evaluacion
draft → in_progress → completed → shared- El reviewer crea la evaluacion en modo draft
- Rellena las metricas y comentarios
- Marca como completada
- Comparte con el empleado
Endpoints
| Metodo | Ruta | Descripcion |
|---|---|---|
| GET | /api/hr/evaluations | Listar evaluaciones |
| POST | /api/hr/evaluations | Crear evaluacion |
| GET | /api/hr/evaluations/:id | Ver evaluacion |
| PATCH | /api/hr/evaluations/:id | Editar evaluacion |
| POST | /api/hr/evaluations/:id/complete | Completar evaluacion |
| POST | /api/hr/evaluations/:id/share | Compartir con empleado |
| DELETE | /api/hr/evaluations/:id | Eliminar evaluacion |
Crear evaluacion
POST /api/hr/evaluationsAuthorization: Bearer <token>Content-Type: application/json
{ "employee_id": "emp_001", "reviewer_id": "emp_003", "period": "2026-H1", "evaluation_date": "2026-06-30", "items": [ { "category": "Rendimiento", "item": "Calidad del trabajo", "rating": 4 }, { "category": "Rendimiento", "item": "Productividad", "rating": 4 }, { "category": "Comunicacion", "item": "Clarity", "rating": 3 }, { "category": "Liderazgo", "item": " Iniciativa", "rating": 5 } ], "strengths": "Excelente capacidad de analisis y resolucion de problemas. Siempre cumple plazos.", "areas_for_improvement": "Pode mejorar la comunicacion en reuniones grandes.", "goals_for_next_period": "Reducir el tiempo de respuesta a ticket de nivel 1 por debajo de 2 horas."}Objetivos
Modelo
interface Objective { id: string; employee_id: string; title: string; description?: string; category: 'sales' | 'quality' | 'efficiency' | 'learning' | 'other'; start_date: string; due_date: string; target_value?: number; current_value?: number; unit?: string; // "EUR", "unidades", "horas" status: 'active' | 'completed' | 'cancelled'; completion_date?: string; weight: number; // Ponderacion para calcular score created_at: string;}Endpoints
| Metodo | Ruta | Descripcion |
|---|---|---|
| GET | /api/hr/objectives | Listar objetivos |
| POST | /api/hr/objectives | Crear objetivo |
| PATCH | /api/hr/objectives/:id | Actualizar objetivo |
| POST | /api/hr/objectives/:id/complete | Completar objetivo |
| DELETE | /api/hr/objectives/:id | Eliminar objetivo |
Listar objetivos de un empleado
GET /api/hr/objectives?employee_id=emp_001&status=activeResumen de endpoints
| Metodo | Ruta | Descripcion |
|---|---|---|
| GET | /api/hr/evaluations | Listar evaluaciones |
| POST | /api/hr/evaluations | Crear evaluacion |
| GET | /api/hr/evaluations/:id | Ver evaluacion |
| PATCH | /api/hr/evaluations/:id | Editar evaluacion |
| POST | /api/hr/evaluations/:id/complete | Completar |
| POST | /api/hr/evaluations/:id/share | Compartir |
| GET | /api/hr/objectives | Listar objetivos |
| POST | /api/hr/objectives | Crear objetivo |
| POST | /api/hr/objectives/:id/complete | Completar objetivo |