Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/YonAnn99/Acrylitec/llms.txt

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

The Dashboard is the command center for Administrators in Acrylitec. After logging in, admin users are automatically redirected to /dashboard/, where they can see a real-time overview of business performance: key revenue indicators, interactive sales charts broken down by month, week, or year, and a live table of orders that are currently pending or in production.

KPI Cards

Six summary cards appear at the top of the dashboard. Each value is computed server-side in the dashboard view and passed to the template via the kpis context dictionary.

Ingresos este mes

ingresos_mes — Total revenue collected in the current calendar month. Only sales with estatus pagada or entregada are counted.

Ventas este mes

ventas_mes — Total number of sales records created since the first day of the current month, regardless of estatus.

Ingresos totales

ingresos_total — All-time cumulative revenue across every sale ever marked pagada or entregada.

Ventas totales

ventas_total — Total count of all Ventas records in the database, spanning every estatus and time period.

Clientes

clientes_total — Total number of registered Clientes records in the system.

Cotizaciones este mes

cotizaciones_mes — Number of Cotizaciones records whose fecha falls within the current calendar month.

Revenue Charts

Below the KPI row, the dashboard renders an interactive bar chart powered by Chart.js. Three period modes are available, toggled by the Por Mes / Por Semana / Por Año button group. Only sales with estatus pagada or entregada contribute to the chart revenue totals. The server pre-computes all values in Python and serialises them as JSON into the template context (meses_por_anio, semanas_por_anio, labels_anio, data_anio).

Monthly view

Bars are grouped by calendar month and labelled using the Spanish abbreviation and year — for example Ene 2025, Feb 2025. A calendar-style picker lets the administrator navigate between years and drill into a single month to display a single isolated bar for that period.

Weekly view

Bars represent ISO week numbers. Each label shows the week number alongside the Monday start date of that week — for example Semana 3 (20/01). The week picker displays all 53 possible week slots, highlighting only those that contain revenue data.

Annual view

Bars aggregate all revenue for each calendar year. An All years option overlays every year side by side. Individual years can also be selected to display a single bar.

Active Orders

To the right of the chart, a compact table lists every Ventas record whose estatus is either pendiente or en_produccion. The table is populated server-side by the pedidos_activos queryset and shows the following columns for each order:
ColumnSource
#venta.id_venta
ClienteResolved via _cliente_nombre() — works for both POS orders (id_cliente) and legacy quote-based orders (id_cotizacion.id_cliente)
ProductoResolved via _producto_nombre() — shows a single product name or "{nombre} +{N} más" for multi-item POS carts
Estatuspendiente or en_produccion badge
Entregafecha_entrega if set, otherwise
If there are no active orders, the panel displays a confirmation message indicating no pending work.

Access Control

The /dashboard/ route is decorated with both @login_required and @user_passes_test(es_admin, login_url='/sin-permiso/'). A user qualifies as an admin if they are a Django superuser or belong to the Administrador group.Any authenticated user who does not meet this check — such as a regular operator — is redirected to /sin-permiso/ instead of seeing the dashboard. Operators who log in are sent directly to /ventas/ (the sales list), which is accessible to all authenticated users.

Build docs developers (and LLMs) love