#55 Perfil de Personal Administrativo - Añadir Vacaciones del Empleado (No aceptar fechas pasadas)
This commit is contained in:
parent
4421c6fe45
commit
cfd5599d32
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user