From aebae5d550518c0ea1ff4876474d1d4c16945ee5 Mon Sep 17 00:00:00 2001 From: ricardo051199 Date: Wed, 20 Nov 2024 10:07:53 -0400 Subject: [PATCH] =?UTF-8?q?Agregar=20condicion=20para=20tomar=20dia=20libr?= =?UTF-8?q?e=20por=20cumplea=C3=B1os?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/primefactorsolutions/views/RequestRegisterView.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java b/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java index af03693..eb24c27 100644 --- a/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java +++ b/src/main/java/com/primefactorsolutions/views/RequestRegisterView.java @@ -191,6 +191,10 @@ public class RequestRegisterView extends VerticalLayout { private boolean isCategoryAvailable(final List employeeRequests, final TimeOffRequestType category) { + if (category == TimeOffRequestType.CUMPLEAÑOS && employee.getBirthday() == null) { + return false; + } + List requestsByCategory = employeeRequests.stream() .filter(request -> request.getCategory() == category) .toList();