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 byDocumentation 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.
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 fromGET /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 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.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.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.Percentage change in total order count relative to the previous 30-day period. Positive values indicate growth.
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:| Column | Field |
|---|---|
| ID Pedido | id_pedido (e.g. #42) |
| Hora | hora_creacion |
| Cliente | cliente_nombre |
| Tipo | tipo (mesa / pickup / delivery) |
| Total | total formatted as $XX.XX |
| Estado | Estatus_Orden — colour-coded badge |
Filtering
Two independent filters are applied as query parameters when fetching fromGET /api/reportes/pedidos. Both filters trigger an automatic data reload when changed.
Status filter (?estado=) — dropdown selector:
| Option | Value sent |
|---|---|
| Todos los estados | (parameter omitted) |
| Recibido | Recibido |
| Preparando | Preparando |
| Listo | Listo |
?periodo=) — segmented button group:
| Button label | Value sent | Description |
|---|---|---|
| Hoy | hoy | Orders created on the current calendar day |
| 7 días | semana | Orders from the last 7 days |
| 30 días | mes | Orders from the last 30 days |
?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:data:text/csv URI injected into a dynamically created <a> element, making it available even when offline after the data has been loaded.