The Inventory module gives the warehouse and kitchen teams a single place to track every ingredient and supply item used in Restaurant Equis. It loads current stock levels from the database, highlights items that have fallen to or below their minimum threshold in red, and provides full create / edit / delete controls through a modal form. A live badge in the page header shows the count of low-stock items at a glance.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/teofilobetancourt/Restaurant-Equis/llms.txt
Use this file to discover all available pages before exploring further.
Inventory Items
All items are fetched on mount viaGET /api/inventario. The table columns map to the following fields in the Inventario.Insumos PostgreSQL table:
Human-readable name of the ingredient or supply item (maps to
Nombre_Insumo in the database schema). Example: Carne de res.Current quantity on hand (maps to
Stock_Actual). Compared against stock_minimo to determine alert status.Unit of measure (maps to
Unidad_Medida). Accepted values: kg, g, L, mL, unidad, paquete, caja, bolsa, litro.Minimum acceptable stock level (maps to
Stock_Minimo). When stock ≤ stock_minimo, the item is flagged as low-stock.Reorder point (maps to
Punto_Reorden). When not provided on creation, defaults to stock_minimo × 1.5. Returned in the API response for reference.Stock Alerts
The system evaluates each item using the condition:Adding Items
Click Agregar Ítem to open the creation modal. Fill in the required fields and click Guardar. The frontend sends:id_inventario) and the row is appended to the table without a full page reload.
Editing Items
Click the pencil icon on any row to open the edit modal pre-populated with that item’s current values. Modify any field and click Guardar. The frontend calls:Deleting Items
Click the trash icon on any row. A browser confirmation dialog asks:Database Schema
Inventory items are stored in theInventario.Insumos table inside a PostgreSQL schema named Inventario. The canonical column names used by the database differ from the simplified field names used by the frontend API adapter:
| API field | Database column |
|---|---|
id_inventario | ID_Insumos |
nombre | Nombre_Insumo |
stock | Stock_Actual |
unidad | Unidad_Medida |
stock_minimo | Stock_Minimo |
Punto_Reorden | Punto_Reorden |
src/api/index.ts) normalises both naming conventions so that the UI works regardless of which form the backend returns.