TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/DragonesMagicos/ferromax_v0.8/llms.txt
Use this file to discover all available pages before exploring further.
EMPLEADO role is designed for store floor staff. Employees process in-store sales via the POS terminal, receive merchandise arriving from suppliers, and create delivery note (remito) receipts — all without ever seeing sensitive cost pricing or supplier data. Speed is the top priority in the employee workflow: the POS terminal is optimized for barcode-scanner-driven checkout, and every endpoint an employee uses is scoped to only the data their job requires.
Default Credentials
TheDataInitializer seeds the following employee account on first boot if no users exist in the database:
| Field | Value |
|---|---|
[email protected] | |
| Password | empleado123 |
| Role | EMPLEADO |
Accessible Modules
POS Terminal
The primary employee interface at
/pos. Processes in-store sales by scanning barcodes or entering SKUs. Each completed sale is recorded with OrigenVentaEnum.POS and linked to the employee’s user ID as the cashier.Product Lookup (No Cost Price)
Employees query products through the
/productos/empleado/** endpoints, which return ProductoEmpleadoDTO — a filtered DTO that deliberately omits precioCompra (purchase price) and nombreProveedor (supplier name). Supports lookup by full list, SKU, and barcode.Goods Receipt (Recepción)
Post individual item receipts via
POST /recepcion when stock arrives outside the remito workflow. This increments the product’s stockActual immediately.Remito Creation
Create supplier delivery note records via
POST /recepciones-remito. The remito is created with a PENDIENTE status and queued for admin approval before stock is committed. Employees can view their own submitted remitos via GET /recepciones-remito/mis-recepciones.Today's Sales
GET /ventas/mis-ventas-hoy returns all POS sales processed by the currently authenticated employee today (scoped to their cajeroId). Employees cannot see sales from other cashiers or from previous days.Supplier List (Read-Only)
GET /proveedores is available to employees for reference during goods receipt. All other supplier management endpoints (POST, PUT, DELETE) are restricted to ADMIN.Employee-Only API Endpoints
The following endpoints are restricted toEMPLEADO (or shared between ADMIN and EMPLEADO, noted where applicable):
| Method | Path | Access | Description |
|---|---|---|---|
GET | /productos/empleado | EMPLEADO only | Full product list — omits cost price and supplier |
GET | /productos/empleado/sku/{sku} | EMPLEADO only | Product lookup by SKU — omits cost price and supplier |
GET | /productos/empleado/barcode/{codigo} | EMPLEADO only | Product lookup by barcode — omits cost price and supplier |
GET | /ventas/mis-ventas-hoy | EMPLEADO only | Authenticated employee’s sales for today |
POST | /ventas | ADMIN, EMPLEADO, CLIENTE | Register a new sale (POS origin for EMPLEADO) |
GET | /ventas/{id} | ADMIN, EMPLEADO | Retrieve a single sale by ID |
GET | /ventas/{id}/detalle | ADMIN, EMPLEADO | Full line-item detail for a sale |
POST | /recepcion | ADMIN, EMPLEADO | Post a single-item stock receipt |
POST | /recepciones-remito | ADMIN, EMPLEADO | Create a new remito receipt header |
GET | /recepciones-remito/mis-recepciones | ADMIN, EMPLEADO | List remitos created by the authenticated user |
GET | /recepciones-remito/{id} | ADMIN, EMPLEADO | Detail of a specific remito |
GET | /proveedores | ADMIN, EMPLEADO | Read-only supplier list (all write operations on /proveedores/** are ADMIN-only) |
Restrictions
Understanding what employees cannot do is just as important as knowing what they can:- No cost prices or supplier names. The
/productos/empleadoendpoints returnProductoEmpleadoDTO, which is a projection that stripsprecioCompraandnombreProveedor. Calling the full admin product endpoints (GET /productos,GET /productos/sku/{sku},GET /productos/barcode/{codigo}) returns403 Forbiddenfor employees. - Cannot approve remitos. Employees create remito records (
POST /recepciones-remito) but cannot confirm them. Approval — which triggers the actual stock commit — is gated behindPATCH /recepciones-remito/{id}/confirmar, which isADMIN-only. - No dashboard access. All
/dashboard/**endpoints areADMIN-only. The React app redirects employees directly to/posafter login. - No stock adjustments. Manual stock corrections (
POST /ajustes-stock,GET /ajustes-stock) areADMIN-only. - No invoice OCR. The
/facturas/**endpoints areADMIN-only. - Cannot void sales.
PUT /ventas/{id}/anularisADMIN-only.
Frontend Routes (Empleado)
The React app (App.jsx) uses <ProtectedRoute requiereEmpleado> to grant employees access to these routes (which are also accessible to admins):
| Route | Component | Description |
|---|---|---|
/pos | POS | Barcode-scanner POS terminal — default post-login page for employees |
/recepcion | RecepcionPage | Single-item stock receipt form |
/productos | Productos | Product browser (displays employee-safe data) |
/ventas | Ventas | Sales list (employees see their own; admins see all) |