From f46d2cac037e9f1ca6fcbc6cf5abd2f14c93d6ae Mon Sep 17 00:00:00 2001 From: Melina Gutierrez Date: Fri, 15 Nov 2024 12:08:06 -0400 Subject: [PATCH] =?UTF-8?q?A=C3=B1adir=20correcion=20a=20Employee?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/primefactorsolutions/views/ReporteView.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/primefactorsolutions/views/ReporteView.java b/src/main/java/com/primefactorsolutions/views/ReporteView.java index 653724f..e1a962b 100644 --- a/src/main/java/com/primefactorsolutions/views/ReporteView.java +++ b/src/main/java/com/primefactorsolutions/views/ReporteView.java @@ -72,7 +72,7 @@ public class ReporteView extends VerticalLayout { // Configurar el ComboBox de semanas initializeSemanaComboBox(); - // Listener para actualizar semanaInfoSpan con la selección del usuario en semanaComboBox + // Listener para actualizar `semanaInfoSpan` con la selección del usuario en `semanaComboBox` semanaComboBox.addValueChangeListener(event -> { String selectedWeek = event.getValue(); semanaInfoSpan.setText(selectedWeek != null ? selectedWeek : "Selecciona una semana"); @@ -83,7 +83,7 @@ public class ReporteView extends VerticalLayout { HorizontalLayout filtersLayout = new HorizontalLayout(equipoComboBox, semanaComboBox, reportButton); add(filtersLayout); - // Añadir headerLayout al diseño principal para el encabezado dinámico + // Añadir `headerLayout` al diseño principal para el encabezado dinámico add(headerLayout); updateHeaderLayout(null, null); @@ -157,8 +157,8 @@ public class ReporteView extends VerticalLayout { map.put("Employee ID", hoursWorked.getEmployee().getId().toString()); map.put("Empleado", hoursWorked.getEmployee().getFirstName() + " " + hoursWorked.getEmployee().getLastName()); - map.put("Horas Trabajadas", hoursWorked.getHours()); - map.put("Horas Pendientes", 40 - hoursWorked.getHours()); + map.put("Horas Trabajadas", hoursWorked.getTotalHours()); + map.put("Horas Pendientes", 40 - hoursWorked.getTotalHours()); map.put("Observaciones", ""); return map; }) @@ -231,6 +231,6 @@ public class ReporteView extends VerticalLayout { private int getWeekOfYear(final LocalDate date) { return date.get(WeekFields.of(Locale.getDefault()).weekOfWeekBasedYear()); -} + } -} \ No newline at end of file +}