Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/EricMartinez758/corpointa-frontend/llms.txt

Use this file to discover all available pages before exploring further.

Employees (empleados) are the internal staff members who receive materials when a dispatch is processed. Every employee record is linked to a destination — the office, workshop, or department where they are based — and can be flagged as active or inactive to control whether they appear as selectable recipients. You manage all employees at the /empleados route.

Data Model

Each employee record contains the following fields:
FieldTypeConstraintsDescription
id_empleadointegerPrimary key, auto-generatedUnique numeric identifier for the employee
nombre_completostringRequired, max 200 charsFull name of the employee
cedulastringOptional, max 30 charsVenezuelan national identity number
telefonostringOptional, max 30 charsContact phone number
fk_id_destinointegerRequired, foreign keyReferences id_destino in the Destinations table
activobooleanOptionalWhether the employee is currently active
nombre_destinostringRead-only (JOIN)Destination name resolved server-side for display
fk_id_destino must reference an existing destination record. If you attempt to create or update an employee with a destination ID that does not exist, the request will be rejected. Set up your destinations before adding employees.

Features

CRUD Table

The employee list displays nombre_completo, cedula, telefono, the resolved nombre_destino, and the active status. Records can be created, edited, and deleted via inline dialogs.

Filter by Destination

Use the destination column filter to show only employees assigned to a specific office, workshop, or department.

Active / Inactive Toggle

Each row includes an active status indicator. Inactive employees are hidden from dispatch recipient selectors throughout the application but remain in the database for historical records.

Delete with Confirmation

Deleting an employee opens a confirmation dialog. Employees who have been assigned to historical dispatches are preserved in those records even after deletion.

API Reference

All endpoints operate on the /empleados resource and return or accept JSON.

List Employees

GET /empleados
Empleado[]
Returns an array of all employee records, including the server-resolved nombre_destino.
GET /empleados
Response
[
  {
    "id_empleado": 5,
    "nombre_completo": "Ana Rodríguez Pérez",
    "cedula": "V-15678901",
    "telefono": "+58 414 555 0300",
    "fk_id_destino": 2,
    "activo": true,
    "nombre_destino": "Almacén Norte"
  }
]

Get Single Employee

GET /empleados/:id
Empleado
Returns a single employee by their id_empleado.
GET /empleados/5

Create Employee

POST /empleados
Empleado
Creates a new employee. The id_empleado, nombre_destino, and activo fields are managed by the server and should not be sent in the request body.
POST /empleados
Content-Type: application/json

{
  "nombre_completo": "Carlos Méndez",
  "cedula": "V-20456789",
  "telefono": "+58 424 555 0400",
  "fk_id_destino": 2
}

Update Employee

PUT /empleados/:id
Empleado
Updates an existing employee. You may include activo to toggle the employee’s status.
PUT /empleados/5
Content-Type: application/json

{
  "nombre_completo": "Ana Rodríguez Pérez",
  "cedula": "V-15678901",
  "telefono": "+58 414 555 0399",
  "fk_id_destino": 2,
  "activo": true
}

Delete Employee

DELETE /empleados/:id
void
Permanently removes an employee record.
DELETE /empleados/5

Field Validation

nombre_completo
string
required
Full name of the employee. Must be between 1 and 200 characters.
fk_id_destino
integer
required
The ID of the destination this employee is assigned to. Must reference an existing destination record.
cedula
string
Venezuelan national identity number. Optional; max 30 characters.
telefono
string
Contact phone number. Optional; max 30 characters.
activo
boolean
Marks the employee as active (true) or inactive (false). Optional field — inactive employees are excluded from dispatch recipient selectors.

Build docs developers (and LLMs) love