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.

Vacancies (Vacantes) define how many seats are available for each combination of academic program, admission modality, and process. They form the ceiling against which the results engine checks how many applicants can be admitted. Without vacancy records, no results can be published for that program-modality pair — the results calculation will find zero eligible seats and skip the combination entirely.

What Vacancies Represent

Every row in the vacantes table holds:
ColumnDescription
id_programaFK to programa — the academic program
id_modalidadFK to modalidad — the admission track
id_procesoFK to procesos — the admission process
vacantesInteger seat count
estado1 = active, 0 = inactive
id_usuarioThe admin user who last modified this record
A single academic process typically contains dozens or hundreds of vacancy rows — one per program-modality combination.

Viewing Vacancies

Navigate to /admin/vacantes to open the vacancy management screen (Admin/Vacantes/index.vue). The view scopes automatically to the active process (auth()->user()->id_proceso) and accepts a modalidad filter so you can browse one admission track at a time.
POST /admin/get-vacantes-admin
Content-Type: application/json

{
  "modalidad": 1,
  "term": "ingeniería"
}
The response includes every academic program at the process’s nivel (1 = undergraduate, 2 = segunda admisión), with a left-joined vacancy row when one exists. Programs without a vacancy record still appear in the list so the administrator can quickly spot unconfigured seats. Example response:
{
  "estado": true,
  "datos": {
    "data": [
      {
        "id_programa": 3,
        "codigo_sunedu": "00312",
        "programa": "INGENIERÍA CIVIL",
        "id_vacante": 47,
        "vacantes": 80,
        "estado": 1
      },
      {
        "id_programa": 7,
        "codigo_sunedu": "00801",
        "programa": "MEDICINA HUMANA",
        "id_vacante": null,
        "vacantes": null,
        "estado": null
      }
    ],
    "total": 38,
    "per_page": 50
  }
}

Setting or Updating Vacancy Counts

1

Locate the Program Row

Use the search field to filter by codigo_sunedu or program name. The list shows all programs registered at the process level.
2

Enter the Seat Count

Click the edit control on the row and type the new vacancy number. A value of 0 is valid and means the program participates in the process but admits nobody through ordinary channels.
3

Save

The form posts to POST /admin/save-numero-vacantes. The controller creates a new Vacante record if id_vacante is absent, or updates the existing record if it is present.
# Create a new vacancy record (id_vacante absent or null)
POST /admin/save-numero-vacantes
Content-Type: application/json

{
  "id_programa": 3,
  "id_modalidad": 1,
  "vacantes": 80
}

# Update an existing record (id_vacante present)
POST /admin/save-numero-vacantes
Content-Type: application/json

{
  "id_vacante": 47,
  "id_programa": 3,
  "id_modalidad": 1,
  "vacantes": 95
}
Success response (create):
{
  "titulo": "REGISTRO NUEVO",
  "estado": true,
  "datos": { "id": 47, "id_programa": 3, "vacantes": 80, "id_proceso": 14, "id_modalidad": 1, "estado": 1 }
}
Success response (update):
{
  "titulo": "!REGISTRO MODIFICADO!",
  "estado": true,
  "datos": { "id": 47, "vacantes": 95, "estado": 1 }
}

Removing a Vacancy Record

To remove a vacancy (effectively disabling a program-modality pair for the active process):
POST /admin/delete-vacante
Content-Type: application/json

{ "id_vacante": 47 }
The controller calls Vacante::find($request->id_vacante)->delete(). The program will continue to appear on the vacancy list but with null vacancy values, making it easy to reconfigure later.

Program-Modality Matrix

Administrators can view a condensed pivot matrix of all programs and their active modalities via ProgramaProcesoController::getProgramaProceso():
GET /admin/get-programas-proceso
Each row represents a program and each column corresponds to a modality ID. Cells contain "SI" when an active vacancy exists, or "-" when the combination is not configured. This gives a quick bird’s-eye view of the entire process configuration.

Ratio Configuration

Ratios (Ratio) allow the results engine to weight or cap admissions by applicant category within a program. The ratio configuration screen is available at:
GET /admin/ratio
Ratios are consulted during result generation to ensure proportional distribution of admitted applicants is respected before the overall vacancy ceiling is applied. Other modules (results, reports, biometric summary) need to present only modalities or programs that actually have vacancies in the current process. The following helper endpoints serve these dropdowns. Note that all three routes below exist outside the /admin prefix and are globally accessible to authenticated users:
# Modalities with at least one vacancy in a specific process
GET /get-select-modalidad-proceso/{id}

# Programs with active vacancies for a given modality + process
POST /get-select-programas-proceso
{ "id_modalidad": 1, "id_proceso": 14 }

# Programs with active vacancies filtered by modality, process, and academic area
POST /get-select-programas-proceso-area
{ "id_modalidad": 1, "id_proceso": 14, "area": "BIOMÉDICAS" }
The admin-scoped endpoint for the current user’s active process is available under the admin prefix:
# Programs with active vacancies (admin context, uses auth()->user()->id_proceso)
GET /admin/get-select-programas-proceso-admin
Both GET /get-select-modalidad-proceso/{id} and POST /get-select-programas-proceso return { "estado": true, "datos": [ { "value": <id>, "label": "<name>" }, ... ] }.

How Vacancies Affect Results

During the results processing step, the engine queries the vacantes table for each program-modality-process triple. It then ranks applicants by score and marks as apto = 'SI' only those who fall within the seat limit. Any applicant ranked beyond the vacancy count is marked apto = 'NO'.
Changing a vacancy count after results have been published and made public will cause the displayed rankings to become inconsistent with the stored apto flags in the resultados table. If you need to adjust seats after publication, rerun the results calculation for the affected program-modality combination and re-publish the results to ensure data integrity.

Vacancy Status Tracking

To understand seat fill rates, combine the vacancy count from vacantes.vacantes with the inscription count from inscripciones filtered to the same id_programa, id_modalidad, and id_proceso. The dashboard’s “Top Programas con más Inscritos” chart (GET /admin/dashboard/inscritos-por-programa) gives a quick visual of programs that are approaching or exceeding their configured vacancy limits.
StatusHow to identify
Unconfiguredid_vacante IS NULL in the vacancy list response
Emptyvacantes = 0 — seats set to zero
Under capacityinscripciones_count < vacantes
At capacityinscripciones_count = vacantes
Over-inscribedinscripciones_count > vacantes (normal — final selection happens at results stage)

Build docs developers (and LLMs) love