Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ariellukezz/admision-web/llms.txt

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

The admin dashboard is the central command panel for the Sistema de Admisión Web. Every time the administrator logs in, they land at /admin/dashboard where all key metrics for the currently active admission process are assembled in a single view. Charts refresh on page load via parallel asynchronous requests, so the figures always reflect the latest database state without requiring a manual page refresh.
Access to the admin dashboard and all routes under the /admin/* prefix requires id_rol = 1. The Admin middleware (app/Http/Middleware/Admin.php) enforces this check on every request and returns HTTP 403 if the authenticated user does not meet the requirement. Login automatically redirects users with id_rol = 1 to /admin/dashboard.

Key Performance Indicators

The top row of the dashboard surfaces four KPI cards, each scoped to the process stored in auth()->user()->id_proceso:
CardMetricSource tableToday delta
PreinscritosTotal pre-registrations in the active processpre_inscripcionpreinscritos_hoy
InscritosCompleted enrollments (estado = 0)inscripcionesinscritos_hoy
Ctrl. BiométricoBiometric captures recordedcontrol_biometricobiometricos_hoy
PostulantesApplicants linked to an inscription (estado = 0)postulante joined to inscripciones
All four counters are fetched in a single call to GET /admin/dashboard/resumen-general, which returns a JSON object under the datos key with the following fields:
GET /admin/dashboard/resumen-general
{
  "success": true,
  "datos": {
    "preinscritos": 2310,
    "inscritos": 1840,
    "biometricos": 615,
    "postulantes": 1835,
    "preinscritos_hoy": 12,
    "inscritos_hoy": 8,
    "biometricos_hoy": 3
  }
}

Legacy KPI Endpoints

In addition to the unified resumen-general endpoint, two older endpoints remain active and are consumed by some dashboard widgets:
# Total pre-registrations + last registration date
GET /admin/get-preinscritos

# Total inscriptions (estado = 0) + last registration date
GET /admin/get-inscritos
Both return { "estado": true, "preinscritos"/"inscritos": <count>, "fecha": { "count": N, "date": "YYYY-MM-DD" } }.

Biometric Progress Bar

Below the KPI cards, a full-width progress bar tracks how many admitted applicants (total_ingresantes) have completed biometric registration (con_biometrico). The percentage is calculated server-side by DashboardController::biometricoResumen() and displayed as a gradient bar. The card also breaks down biometric coverage by academic area.
GET /admin/dashboard/biometrico-resumen
Response shape:
{
  "success": true,
  "datos": {
    "total_ingresantes": 842,
    "con_biometrico": 615,
    "sin_biometrico": 227,
    "porcentaje": 73.0,
    "por_area": [
      { "area": "INGENIERÍAS", "ingresantes": 410, "biometrico": 320 },
      { "area": "BIOMÉDICAS",  "ingresantes": 210, "biometrico": 180 },
      { "area": "SOCIALES",    "ingresantes": 222, "biometrico": 115 }
    ],
    "fechas_ingreso": ["2024-11-15", "2024-11-16"]
  }
}

Charts and Visualisations

The dashboard renders seven interactive Chart.js visualisations (Line, Bar, Doughnut, Pie), all powered by vue-chartjs. Charts are conditionally rendered — they only appear when resumen.inscritos > 0, so a new process with no inscriptions shows a clean empty-state message instead of blank axes.

Inscripciones por Fecha

A line chart displaying the daily inscription count as a time-series. Endpoint: GET /admin/dashboard/timeline-inscripciones

Inscripciones por Género y Área

Grouped bar chart comparing male (sexo = 1) and female (sexo = 2) applicants across each academic area. Endpoint: GET /admin/dashboard/genero-por-area

Postulantes por Área

Doughnut chart breaking down total applicants by academic area (e.g. INGENIERÍAS, BIOMÉDICAS, SOCIALES). Endpoint: GET /admin/dashboard/postulantes-por-area

Distribución por Modalidad

Doughnut chart showing how inscriptions are distributed across admission modalities (e.g. Ordinario, Especial). Endpoint: GET /admin/dashboard/modalidad-distribucion

Top Programas con más Inscritos

Horizontal bar chart of the top 15 academic programs by inscription count, colour-coded by area. Endpoint: GET /admin/dashboard/inscritos-por-programa

Tipo de Colegio

Pie chart showing the gestion distribution of applicants’ secondary schools (public vs private). Endpoint: GET /admin/dashboard/tipo-colegio-distribucion

Biométrico por Área

Grouped bar chart comparing total admitidos vs biometric-registered vs pending per area. Endpoint: GET /admin/dashboard/biometrico-resumen

Mejores Inscriptores

Ranked list of the top staff members who registered the most inscriptions, with a relative progress bar. Endpoint: GET /admin/get-mejores-inscriptores

Top Inscriptores Endpoints

Two endpoints exist for the “Mejores Inscriptores” widget. The first returns the top 4 by total count; the second returns up to 5 users who have recorded more than 5 inscriptions, ordered ascending (reversed for display):
# Top 4 inscriptors overall (GET)
GET /admin/get-mejores-inscriptores

# Top 5 inscriptors with > 5 inscriptions (POST)
POST /admin/get-mejores-inscriptores-dia
Both return { "estado": true, "inscriptores": [ { "cant": N, "name": "...", "paterno": "...", "materno": "..." }, ... ] }.

Demographic Reports

From the dashboard’s reporting sub-panel (/admin/component), administrators can retrieve additional demographic breakdowns without leaving the section:
ReportEndpointDescription
Gender distributionGET /admin/get-inscritos-genero-reporteInscription count grouped by postulante.sexo
Age distributionGET /admin/get-inscritos-edad-reporteTop 7 age groups (TIMESTAMPDIFF(YEAR, fec_nacimiento, CURDATE()))
ResidenceGET /admin/get-inscritos-residencia-reporteTop 6 department/province/district combinations
Origin (birth place)GET /admin/get-inscritos-procedencia-reporteTop 8 birth-place combinations
Graduation yearGET /admin/get-inscritos-egreso-reporteTop 7 high school graduation years (postulante.anio_egreso)
DisabilityGET /admin/get-inscritos-discapacidad-reporteCount by postulante.discapacidad value
Document typeGET /admin/get-inscritos-tipo-documento-reporteCounts grouped by tipo_documento_identidad.nombre
Top schoolsGET /admin/get-inscritos-colegio-reporteTop 7 schools by colegios.cod_modular
School originGET /admin/get-inscritos-procedencia-colegio-reporteTop 7 school locations (dep/prov/dist)
School typeGET /admin/get-inscritos-tipo-colegio-reporteGrouped by colegios.gestion (public vs private)
All ten endpoints return { "datos": [...], "estado": true } and are consumed by the Chart.js visualisations in Admin/Dashboard/components/reportes.vue. The AuthenticatedLayout sidebar provides direct links to all admin submodules. From the dashboard header the administrator can switch between:
  • Procesos (/admin/procesos) — Create and configure admission processes
  • Vacantes (/admin/vacantes) — Set seat limits per program and modality
  • Inscripciones (/admin/inscripciones) — Browse and manage enrollments
  • Control Biométrico (/admin/control-biometrico) — Biometric registration tracking
  • Usuarios (/admin/usuarios) — Staff account management
  • Reportes / Resúmenes — Export reports as PDF or Excel
  • Trazabilidad (/admin/trazabilidad) — Full audit trail

Changing the Active Process

The dashboard always displays data for the process assigned to the authenticated user (auth()->user()->id_proceso). To switch context, the administrator calls:
POST /admin/cambiar_proceso
Content-Type: application/json

{ "id_proceso": 12 }
This updates users.id_proceso for the authenticated user via ProcesoController::cambiarProceso(). All subsequent dashboard requests then aggregate data against the new process ID.

Applicant Profile Lookup

Administrators can view a full applicant profile from the dashboard by navigating to /admin/perfil-postulante or by using the DNI lookup:
GET /admin/postulante-perfil/{dni}
DashboardController::showPostulante() renders the Admin/Postulante/Perfil Inertia page with pre-inscription counts, inscription history, biometric count, colegio data, a photo URL, and any linked user account.

Audit Trail Access

Every administrative action — from saving a process to editing vacancies — is recorded in the audit_trail table via AuditService. The trazabilidad view (/admin/trazabilidad) provides filterable access to this log.
1

Open the Audit Trail

Navigate to Trazabilidad in the sidebar or go directly to /admin/trazabilidad.
2

Filter by Actor or Action

Use the action, user_id, date_from, and date_to query parameters to narrow results. The endpoint is GET /admin/trazabilidad/data.
3

Review the Action Summary

Call GET /admin/trazabilidad/resumen to get a 30-day breakdown of actions by type, affected model, and top actors.

Build docs developers (and LLMs) love