> ## 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.

# Personal Registry

> Manage the master list of employees — add, delete, import, and export HR records used across all vacation modules.

The Personal Registry is the foundation of the system. Every other module — vacation scheduling, rescheduling, and administration — depends on the employee records stored here. Use this module to create and maintain the master list of staff members.

Navigate to this module at `/registro-personal`.

## Employee fields

Each employee record contains the following fields:

| Field                | Description                                                |
| -------------------- | ---------------------------------------------------------- |
| **Nombre**           | Employee's first name                                      |
| **Apellido**         | Employee's last name                                       |
| **Email**            | Work email address                                         |
| **Puesto**           | Job title or position                                      |
| **Fecha de Ingreso** | Official hire date (used to calculate the vacation period) |

<Info>
  The vacation period for an employee begins exactly one year after their hire date. For example, an employee hired on 15 March 2024 becomes eligible for their first vacation period starting 15 March 2025.
</Info>

## How to add an employee

<Steps>
  <Step title="Open the Personal Registry">
    Navigate to `/registro-personal`. The registration form appears on the left side of the page.
  </Step>

  <Step title="Fill in the employee details">
    Complete all five fields: **Nombre**, **Apellido**, **Email**, **Puesto**, and **Fecha de Ingreso**. All fields are required — the form will not submit if any are empty.
  </Step>

  <Step title="Submit the form">
    Click **Registrar Personal**. The employee is saved and immediately appears in the registered employees table on the right side of the page.
  </Step>
</Steps>

<Warning>
  All five fields are mandatory. Submitting with any field blank will show an error and prevent the record from being saved.
</Warning>

## How to delete an employee

In the registered employees table, locate the employee row and click the trash icon on the right side of the row. The record is permanently removed from the system.

<Warning>
  Deleting an employee also removes them from the employee selector in other modules. Any existing vacation schedules linked to that employee will become orphaned. Delete with caution.
</Warning>

## Importing employees from Excel

You can bulk-import employees from an Excel spreadsheet instead of entering them one by one.

<Steps>
  <Step title="Prepare your spreadsheet">
    Create an `.xlsx` or `.xls` file where the first row contains column headers. The importer recognises the following header names for each field:

    | Field      | Accepted column headers                                                                 |
    | ---------- | --------------------------------------------------------------------------------------- |
    | First name | `nombre`, `Nombre`, `NOMBRE`, `firstName`, `FirstName`                                  |
    | Last name  | `apellido`, `Apellido`, `APELLIDO`, `lastName`, `LastName`                              |
    | Hire date  | `fechaIngreso`, `fecha_ingreso`, `FechaIngreso`, `Fecha de Ingreso`, `fecha de ingreso` |
    | Email      | `email`, `Email`, `EMAIL`                                                               |
    | Job title  | `puesto`, `Puesto`, `cargo`, `Cargo`                                                    |

    Each subsequent row represents one employee.
  </Step>

  <Step title="Click Import">
    In the page header, click **Imp. Per. (Excel)**. A file picker opens.
  </Step>

  <Step title="Select your file">
    Choose your `.xlsx` or `.xls` file. The system reads the first sheet, maps each column to the appropriate field, and replaces the current employee list with the imported data.
  </Step>
</Steps>

<Warning>
  Importing from Excel **replaces** the current employee list in local storage. Employees already saved on the server are not affected until you re-save, but the in-memory list shown on screen will reflect only the imported data. Use this action carefully in production environments.
</Warning>

<Tip>
  If your spreadsheet uses a different header name than those listed above, rename the column before importing. Any column the system cannot recognise is silently ignored.
</Tip>

## Exporting employees to JSON

To create a backup of the employee list, click **Exp. (JSON)** in the page header. The system downloads a `.json` file named `SISTEMA_DIGC_Personal_<date>.json` containing all registered employee records.

<Note>
  The export includes all fields for each employee, including internal IDs. You can use this file to restore or migrate data.
</Note>

## Related modules

<CardGroup>
  <Card title="Vacation Scheduling" icon="calendar-plus" href="/modules/vacation-scheduling">
    Schedule vacation ranges for registered employees.
  </Card>

  <Card title="Vacation Overview" icon="calendar" href="/modules/vacation-overview">
    View vacation usage summaries per employee.
  </Card>
</CardGroup>
