Skip to main content

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.

The Reports module gives management a data-driven view of restaurant performance. On load it fetches two independent data sets in parallel: a KPI summary card set powered by GET /api/reportes/resumen, and a filterable orders table powered by GET /api/reportes/pedidos. Both data sets refresh automatically whenever the status or period filter changes. The paginated orders table can be exported to a CSV file at any time with a single click.

KPI Summary Cards

The three summary cards at the top of the dashboard are populated from GET /api/reportes/resumen. Each card shows a metric value and a trending indicator comparing the current 30-day period against the previous 30-day period.
total_pedidos
number
Total number of orders recorded in the current 30-day window. Displayed with a percentage change (pct_cambio_pedidos) versus the previous equivalent period — rendered as a green upward arrow when positive and a red downward arrow when negative.
ingresos_brutos
number
Gross revenue in USD for the current 30-day period, calculated as the sum of all order total values. Displayed with a percentage change (pct_cambio_ingresos) versus the previous period.
tiempo_promedio_seg
number
Average order completion time in seconds, measured from hora_creacion to the moment the order reached Listo or Entregado status. Displayed in a human-readable Xm YYs format. No percentage change comparison is shown for this metric.
pct_cambio_pedidos
number
Percentage change in total order count relative to the previous 30-day period. Positive values indicate growth.
pct_cambio_ingresos
number
Percentage change in gross revenue relative to the previous 30-day period. Positive values indicate revenue growth.

Orders Table

The orders table is loaded from:
GET /api/reportes/pedidos
GET /api/reportes/pedidos?estado=Preparando&periodo=hoy
Each row in the table shows:
ColumnField
ID Pedidoid_pedido (e.g. #42)
Horahora_creacion
Clientecliente_nombre
Tipotipo (mesa / pickup / delivery)
Totaltotal formatted as $XX.XX
EstadoEstatus_Orden — colour-coded badge
The table is paginated at 10 rows per page. Navigation controls at the bottom show the current range (e.g. Mostrando 1–10 de 47) along with previous/next buttons and up to five numbered page buttons.

Filtering

Two independent filters are applied as query parameters when fetching from GET /api/reportes/pedidos. Both filters trigger an automatic data reload when changed. Status filter (?estado=) — dropdown selector:
OptionValue sent
Todos los estados(parameter omitted)
RecibidoRecibido
PreparandoPreparando
ListoListo
Period filter (?periodo=) — segmented button group:
Button labelValue sentDescription
HoyhoyOrders created on the current calendar day
7 díassemanaOrders from the last 7 days
30 díasmesOrders from the last 30 days
Both filters can be combined — for example ?estado=Listo&periodo=semana returns all completed orders from the past week.

CSV Export

Clicking Exportar CSV generates and downloads a CSV file directly in the browser — no server round-trip required. The export covers the entire current filtered dataset (not just the current page). The file is named using the current date:
pedidos_2026-07-15.csv
The CSV includes the following columns:
"ID Pedido","Hora","Cliente","Cédula","Teléfono","Tipo","Total","Estado"
"#42","2026-07-15T14:32:00","JUAN PEREZ","V-12345678","0414-0000000","mesa","29.00","Listo"
The export is implemented entirely on the frontend using a data:text/csv URI injected into a dynamically created <a> element, making it available even when offline after the data has been loaded.
Review the Reports dashboard at the start and end of each shift to monitor real-time performance trends. Use the Hoy period filter to check today’s order volume and revenue against the KPI cards’ 30-day baseline. If pct_cambio_ingresos is trending negative over multiple days, cross-reference with the Inventory module to check whether stock shortages are limiting available menu items.

Build docs developers (and LLMs) love