Observaciones-vacaciones #83

Merged
alex merged 11 commits from Observaciones-vacaciones into main 2024-11-25 02:17:52 +00:00
Showing only changes of commit aebae5d550 - Show all commits

View File

@ -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();