> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/CKoldo/Vacaciones-front/llms.txt
> Use this file to discover all available pages before exploring further.

# Administration

> Assign and manage ESINAD document IDs for vacation and rescheduling records across all employees.

The Administration module is where HR staff assign official ESINAD reference numbers to vacation and rescheduling records. An ESINAD is the official document ID that links a vacation or rescheduling entry to its authorizing paperwork.

Navigate to this module at `/administracion`.

## What is an ESINAD?

An ESINAD (*Expediente de Sistema Nacional de Administración Documentaria*, or similar organizational reference) is an official document identifier assigned to each vacation or rescheduling record. It connects the system entry to the physical or digital document that authorized it.

<Info>
  ESINAD IDs are free-form text. The system does not validate their format. Follow your organization's naming convention — for example: `ESI-2026-001`.
</Info>

## Page overview

At the top of the main card, the system displays two counters:

* **Total vacaciones** — the total number of vacation ranges (records without a `reprogramadoDesde` reference)
* **Total reprogramaciones** — the total number of rescheduled ranges (records that reference original ranges)

These counts cover all employees and all periods.

## Filtering records

Use the three filter controls to narrow down the records shown in the table:

### Filter by status (Estado)

| Option           | Shows                                     |
| ---------------- | ----------------------------------------- |
| **Todos**        | All records regardless of estado          |
| **Activo**       | Only ranges with `estado: "activo"`       |
| **Reprogramado** | Only ranges with `estado: "reprogramado"` |

### Filter by category (Categoría)

| Option             | Shows                                                                                  |
| ------------------ | -------------------------------------------------------------------------------------- |
| **Todos**          | Both vacation and rescheduling records                                                 |
| **Vacación**       | Only original vacation ranges (no `reprogramadoDesde` reference)                       |
| **Reprogramación** | Only rescheduled ranges (those that reference original ranges via `reprogramadoDesde`) |

### Filter by employee

Use the **Filtrar por Personal** dropdown to limit the table to a single employee's records.

<Tip>
  Combine the category filter ("Reprogramación") with the employee filter to quickly prepare a batch ESINAD assignment for all rescheduled records belonging to one person.
</Tip>

## Table columns

The filtered results appear in a table with the following columns:

| Column                 | Description                                                 |
| ---------------------- | ----------------------------------------------------------- |
| **Personal**           | Employee's full name                                        |
| **Período Vacacional** | The vacation year label (e.g. `2025-2026`)                  |
| **Fechas**             | Start and end dates of the range                            |
| **Días**               | Number of days in the range                                 |
| **Tipo**               | `Flexible` or `Bloque`                                      |
| **Categoría**          | `VACACION` or `REPROGRAMACION`                              |
| **Estado**             | `Activo` or `Reprogramado`                                  |
| **ESINAD**             | The assigned ESINAD ID, or "Sin ESINAD" if not yet assigned |
| **Acciones**           | Edit button to assign or update the ESINAD                  |

## How to assign an ESINAD to a single record

<Steps>
  <Step title="Find the record">
    Use the filters to locate the vacation or rescheduling range you want to update.
  </Step>

  <Step title="Click the edit button">
    Click the pencil icon in the **Acciones** column of the target row. A dialog opens.
  </Step>

  <Step title="Enter the ESINAD ID">
    Type the ESINAD document reference into the input field and click **Guardar**. The table updates immediately to show the new ID in green.
  </Step>
</Steps>

## How to copy or update an existing ESINAD

If a range already has an ESINAD assigned, opening the edit dialog pre-fills the field with the current value. You can:

* **Edit the value** — modify the text and click **Guardar** to update it.
* **Remove the value** — click the red **Eliminar ESINAD** button that appears when the field is not empty.

## Bulk-assigning the same ESINAD to all visible records

You can assign the same ESINAD ID to all records currently shown in the filtered table in a single action.

<Steps>
  <Step title="Apply the desired filters">
    Set the status, category, and employee filters so the table shows only the records you want to update. The bulk-assign button applies to exactly what is visible.
  </Step>

  <Step title="Open the bulk-assign dialog">
    Click the bulk-assign button (available when the table has results and the current filter combination permits it). A dialog opens showing how many records will be affected.
  </Step>

  <Step title="Enter the ESINAD ID and confirm">
    Type the shared ESINAD reference and click **Asignar a Todos**.
  </Step>
</Steps>

<Note>
  The bulk-assign action only updates records that **do not already have an ESINAD**. Records with an existing ESINAD are skipped to prevent accidental overwrites.
</Note>

<Warning>
  There is no bulk-delete or undo for ESINAD assignments. Double-check your filters and the target ESINAD value before confirming a bulk assignment.
</Warning>

## Related modules

<CardGroup>
  <Card title="Vacation Scheduling" icon="calendar-plus" href="/modules/vacation-scheduling">
    Create the vacation ranges that receive ESINAD IDs here.
  </Card>

  <Card title="Rescheduling" icon="refresh-ccw" href="/modules/rescheduling">
    Rescheduled ranges also appear in this module for ESINAD assignment.
  </Card>

  <Card title="Vacation Overview" icon="calendar" href="/modules/vacation-overview">
    Review the full schedule for any employee.
  </Card>
</CardGroup>
