Agregar condicion para tomar dia libre por cumpleaños
This commit is contained in:
parent
b55d919439
commit
5287f40878
@ -191,6 +191,10 @@ public class RequestRegisterView extends VerticalLayout {
|
|||||||
|
|
||||||
private boolean isCategoryAvailable(final List<TimeOffRequest> employeeRequests,
|
private boolean isCategoryAvailable(final List<TimeOffRequest> employeeRequests,
|
||||||
final TimeOffRequestType category) {
|
final TimeOffRequestType category) {
|
||||||
|
if (category == TimeOffRequestType.CUMPLEAÑOS && employee.getBirthday() == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
List<TimeOffRequest> requestsByCategory = employeeRequests.stream()
|
List<TimeOffRequest> requestsByCategory = employeeRequests.stream()
|
||||||
.filter(request -> request.getCategory() == category)
|
.filter(request -> request.getCategory() == category)
|
||||||
.toList();
|
.toList();
|
||||||
|
Loading…
Reference in New Issue
Block a user