Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ChrisCore1/inventario_sud/llms.txt

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

Consumables are supplies that get used up over time — paper, batteries, cleaning products, printer cartridges, and similar items. Unlike fixed assets, consumables are tracked by running quantity rather than availability status, and the system warns you when stock falls below a minimum threshold you define.

Consumable fields

Each record in the Consumible table stores the following fields:
FieldTypeDescription
nombrevarchar(150)Display name of the consumable
cantidadintegerCurrent stock quantity
stock_minimointegerMinimum threshold before an alert is triggered
unidad_medidavarchar(20)Unit of measure, defaults to "uds" (units)
id_categoriaintegerForeign key to Categoria
id_ubicacionintegerForeign key to Ubicacion

Stock states

The system derives a stock state for each consumable by comparing cantidad against stock_minimo:
StateConditionDashboard color
Óptimocantidad > stock_minimoGreen
Atención requeridacantidad > 0 and cantidad <= stock_minimoOrange
Crítico / Agotadoscantidad = 0Red
The dashboard KPI card reflects the worst state across all consumables. If even one consumable reaches zero, the whole card turns red.
Any consumable that falls to or below its stock_minimo threshold is flagged on the dashboard KPI card as Atención requerida or Crítico. Make sure you set a realistic stock_minimo when registering a consumable so that low-stock alerts fire at a useful time.

Add a consumable

1

Open the consumables page

Navigate to Consumibles from the sidebar. The grid lists all active consumables with their current stock state.
2

Click Register

Click the Registrar consumible button to open RegisterConsumableModal.
3

Fill in the details

Enter the name, initial quantity, minimum stock threshold, unit of measure, category, and location. All fields are required.
4

Submit the form

Click Guardar. The registrarConsumible server action inserts the record into the Consumible table with is_deleted = false and logs the initial stock to the audit trail.

Update stock quantity

1

Locate the consumable

Find the item in the consumables grid.
2

Open the stock update control

Click the quantity update action on the consumable card to reveal the stock input.
3

Enter the new quantity

Type the updated quantity. The actualizarStock action clamps any negative value to 0 — you cannot record negative stock.
4

Confirm the update

Confirm the change. The actualizarStock server action runs an UPDATE on the Consumible table for the given id_consumible, logs the change to the audit trail, and revalidates the /consumibles path.

Edit a consumable

To update a consumable’s name, minimum stock threshold, unit of measure, category, or location, use the edit action on the consumable card. The editarConsumible server action updates all fields for the given id_consumible and logs the change. The input type for editing is:
export type EditConsumableInput = {
  id_consumible: number;
  nombre: string;
  cantidad: number;
  stock_minimo: number;
  unidad_medida: string;
  id_categoria: number;
  id_ubicacion: number;
};

Retire a consumable (Dar de Baja)

When a consumable is no longer needed, you can soft-delete it. The darDeBajaConsumible action sets is_deleted = true on the Consumible record and logs the retirement to the audit trail. The item disappears from the active consumables list and moves to the recycle bin in Configuración, where it can be restored or permanently deleted.

Build docs developers (and LLMs) love