The Control de Personas module manages visitor and contractor access at the plant gate. Security personnel use it to log every person entering or leaving the facility, capturing identity details, visit purpose, and approval status. When a visitor departs, the operator records the exit time and the system automatically calculates the total visit duration in minutes. All records are searchable and paginated for easy review.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JuanDiego3030/Planta_Milenio/llms.txt
Use this file to discover all available pages before exploring further.
Required Permission
Access requires thepermiso_control_personas permission. Users without it cannot reach /control_personas/ on either GET or POST requests.
Registering an Entry
When a visitor arrives at the gate, the operator fills out the entry form and submits it.hora_entrada is set automatically to the current server time — it does not appear as an editable field.
Open the entry form
Navigate to
/control_personas/. The registration form is displayed at the top of the page above the visit history panel.Fill in identity details
Enter the visitor’s nombre (required), cedula (required), and optionally apellido. The cedula field is used as the primary identifier when searching history.
Fill in visit details
Enter the motivo_ingreso (required). Optionally provide empresa (visitor’s company), placa (vehicle plate), a_quien_visita (person being visited), and autorizado_por (who authorised the entry).
Set the approval status
Choose aprobada (default) or negada from the estado_visita selector. Denied visits are immediately closed:
hora_salida is set to the current time and tiempo_visita is recorded as 0 minutes. No separate exit step is needed for denied visitors.Entry Form Fields
| Field | Required | Notes |
|---|---|---|
nombre | ✅ Yes | Visitor’s first name |
cedula | ✅ Yes | National ID number — used as unique search key |
motivo_ingreso | ✅ Yes | Reason for the visit |
apellido | No | Visitor’s surname |
empresa | No | Visitor’s company (autocomplete) |
placa | No | Vehicle plate number |
autorizado_por | No | Name of authorising staff member (autocomplete) |
a_quien_visita | No | Plant staff member being visited |
estado_visita | No | aprobada (default) or negada |
Denied Visits
Whenestado_visita is set to negada, the record is created and immediately closed in a single step:
hora_salidais set to the current timestamp at the moment of form submissiontiempo_visitais stored as0minutes
Registering a Departure
For approved visits, exit is recorded separately when the visitor actually leaves.Find the active visit
Locate the visitor’s open entry in the history panel. Active visits (those without an exit time) show an exit button. Use the search bar to find a specific visitor quickly if the list is long.
Record the exit
Click the exit button. This sends a POST request with
salida_id set to the record’s primary key. The server sets hora_salida to the current timestamp.estado_visita = aprobada) can have exit recorded through this flow. Denied visits are already closed at creation.
Searching the History
Append?buscar=<term> to the URL to filter the paginated history. The search runs across four fields simultaneously:
nombreapellidocedulaplaca_vehiculo
gar will match surnames containing that substring.
Pagination
The history panel shows 10 records per page. Navigate between pages using thehistorial_page parameter:
buscar and historial_page can be combined freely. The pagination controls in the page template maintain the active search term across page navigation.
Read-Only Mode
Accounts with thesolo_consulta flag can access /control_personas/ and use all GET-based features — browsing and searching the history panel. Any POST submission is blocked regardless of its type: this covers both new entry registration (the main entry form) and exit recording (salida_id submissions). The form fields are disabled in the template when this flag is active, making the restriction visible before the operator attempts to submit.