En-desarrollo #80
@ -500,9 +500,14 @@ public class RequestRegisterView extends VerticalLayout {
|
||||
handleExistingRequests(request);
|
||||
}
|
||||
|
||||
requestService.saveTimeOffRequest(request);
|
||||
Notification.show("Solicitud guardada correctamente.");
|
||||
closeForm();
|
||||
long differentDays = ChronoUnit.DAYS.between(LocalDate.now(), request.getStartDate());
|
||||
if (differentDays >= -15 && differentDays <= 90) {
|
||||
requestService.saveTimeOffRequest(request);
|
||||
Notification.show("Solicitud guardada correctamente.");
|
||||
closeForm();
|
||||
} else {
|
||||
Notification.show("La fecha de inicio debe encontrarse dentro del rango de 15 días a 3 meses de anticipación.");
|
||||
}
|
||||
}
|
||||
|
||||
private TimeOffRequest prepareRequest() {
|
||||
|
Loading…
Reference in New Issue
Block a user