Skip to main content

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.

Each 30-day vacation period is divided into two distinct types of days. The type is determined automatically by the number of days in the requested range — you do not choose it manually.

Overview

Flexible days are designed for short breaks throughout the year. An employee can use up to 7 flexible days per period, spread across one or more ranges.
  • Minimum range length: 1 day
  • Maximum range length: 7 consecutive days
  • Total available per period: 7 days
  • Stored on the schedule as diasFlexiblesDisponibles: 7
Once all 7 flexible days have been used, any remaining ranges must be taken as block days (minimum 7 consecutive days).
Flexible days are ideal for long weekends, personal appointments, or one-off days off. They can be taken as a single day at a time.

How the type is assigned

The system inspects the number of days in a submitted range and assigns the type automatically:
days ≤ 7 AND flexible balance remaining  →  tipo: "flexible"
days > 7  OR  flexible balance exhausted  →  tipo: "bloque"
This logic lives in RegistroVacaciones.tsx (esFlexible flag at line 248) and is enforced again in validarRangoVacaciones in vacationUtils.ts.

Comparison table

PropertyFlexibleBlock
tipo value"flexible""bloque"
Minimum days17
Maximum days7No limit (within balance)
Days per period723
Counter fielddiasFlexiblesUsadosdiasBloqueUsados
Typical useLong weekends, single daysMain annual vacation

Validation rules

The system prevents invalid requests with these checks:
  • You cannot start a range on a Saturday or Sunday.
  • If your flexible balance is 0, ranges of 7 days or fewer are blocked with an error.
  • If a requested range exceeds the remaining balance for its type, the request is rejected.
  • Ranges cannot overlap with already-scheduled ranges in the same period.

The Friday rule

When you select a Friday as the start date or end date of a range, the system automatically extends the end date to the following Sunday. The extra two days (Saturday and Sunday) are included in the diasSolicitados count, and the range is flagged with incluye_finde: true. This behaviour is enforced in two places:
  • calcularDiasConFinDeSemana in vacationUtils.ts — sets incluye_finde: true when either boundary is a Friday.
  • RegistroVacaciones.tsx — watches the date inputs and automatically updates fechaFin to the Sunday when a Friday is selected, showing a toast notification.
The two weekend days count against the employee’s vacation balance. A range from Friday to Sunday costs 3 days, not 1.
Ranges that triggered the Friday rule are displayed with an “Incluye fin de semana” badge in the scheduled ranges list.

Example

An employee takes the following ranges during their "2025-2026" period:
Date rangeDaysTypeNotes
3–4 March 20262FlexibleLong weekend
7–21 July 202614BlockMain summer vacation
14–23 September 20269BlockSecond block
Totals used: 2 flexible + 23 block = 25 days
Remaining: 5 flexible + 0 block = 5 days
Once block days are exhausted, any remaining flexible days can still be used in ranges of up to 7 days. However, once flexible days are exhausted, all remaining days must be taken in blocks of at least 7 consecutive days.

Build docs developers (and LLMs) love