#55 Perfil de Personal Administrativo - Añadir Vacaciones del Empleado (No aceptar fechas pasadas)

This commit is contained in:
jesus.pelaez 2024-11-03 23:40:13 -04:00
parent 4421c6fe45
commit cfd5599d32

View File

@ -240,6 +240,11 @@ public class RequestRegisterView extends VerticalLayout {
int startYear = calculateStartYear(previousRequests); int startYear = calculateStartYear(previousRequests);
startDate = determineStartDate(vacation, startYear); startDate = determineStartDate(vacation, startYear);
if (startDate.isBefore(LocalDate.now())) {
startDate = determineStartDate(vacation, startYear + 1);
}
if (startDate != null) { if (startDate != null) {
endDate = startDate.plusDays(vacation.getExpiration().intValue() - 1); endDate = startDate.plusDays(vacation.getExpiration().intValue() - 1);
} else { } else {