Observaciones-vacaciones #83
@ -100,9 +100,12 @@ public class RequestRegisterView extends VerticalLayout {
|
|||||||
updateDatePickerMinValues();
|
updateDatePickerMinValues();
|
||||||
});
|
});
|
||||||
endDatePicker.addValueChangeListener(event -> {
|
endDatePicker.addValueChangeListener(event -> {
|
||||||
|
if (startDatePicker.getValue() != null) {
|
||||||
|
endDatePicker.setMin(startDatePicker.getValue());
|
||||||
|
}
|
||||||
LocalDate selectedDate = event.getValue();
|
LocalDate selectedDate = event.getValue();
|
||||||
if (selectedDate != null && (selectedDate.getDayOfWeek().getValue() == 6 || selectedDate.getDayOfWeek().getValue() == 7)) {
|
if (selectedDate != null && (selectedDate.getDayOfWeek().getValue() == 6 || selectedDate.getDayOfWeek().getValue() == 7)) {
|
||||||
startDatePicker.setValue(selectedDate.minusDays(1));
|
endDatePicker.setValue(selectedDate.minusDays(1));
|
||||||
}
|
}
|
||||||
calculateDays();
|
calculateDays();
|
||||||
});
|
});
|
||||||
@ -408,6 +411,12 @@ public class RequestRegisterView extends VerticalLayout {
|
|||||||
if (balanceDays < 0.0) {
|
if (balanceDays < 0.0) {
|
||||||
clearFields();
|
clearFields();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (daysToBeTakenField.getValue() > 10
|
||||||
|
&& (categoryComboBox.getValue() == TimeOffRequestType.VACACION_GESTION_ANTERIOR
|
||||||
|
|| categoryComboBox.getValue() == TimeOffRequestType.VACACION_GESTION_ACTUAL)) {
|
||||||
|
clearFields();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user