arreglar formato maven compile
All checks were successful
PR Builder / Build-PR (pull_request) Successful in 2m47s

This commit is contained in:
Melina Gutierrez 2024-11-28 08:21:55 -04:00 committed by alex
parent 63e10144ac
commit b2ecc6e059
4 changed files with 8 additions and 7 deletions

View File

@ -176,7 +176,7 @@ public class ReportService {
return cfg;
}
public byte[] generateExcelReport(Employee employee) {
public byte[] generateExcelReport(final Employee employee) {
try (Workbook workbook = new XSSFWorkbook()) {
Sheet sheet = workbook.createSheet("Empleado");
Row titleRow = sheet.createRow(0);

View File

@ -21,7 +21,7 @@ public class EmployeeReportView extends VerticalLayout implements HasUrlParamete
private final EmployeeService employeeService;
private final ReportService reportService;
public EmployeeReportView(EmployeeService employeeService, ReportService reportService) {
public EmployeeReportView(final EmployeeService employeeService, final ReportService reportService) {
this.employeeService = employeeService;
this.reportService = reportService;
Button backButton = new Button("Volver al Reporte de Empleados", event ->
@ -31,7 +31,7 @@ public class EmployeeReportView extends VerticalLayout implements HasUrlParamete
}
@Override
public void setParameter(BeforeEvent event, @OptionalParameter String employeeId) {
public void setParameter(final BeforeEvent event, @OptionalParameter final String employeeId) {
if (employeeId != null) {
UUID id = UUID.fromString(employeeId);
Employee employee = employeeService.getEmployee(id);
@ -43,9 +43,9 @@ public class EmployeeReportView extends VerticalLayout implements HasUrlParamete
}
}
private void generateExcelReport(Employee employee) {
private void generateExcelReport(final Employee employee) {
try {
byte[] excelContent = reportService.generateExcelReport(employee); // Implementa esta lógica en tu `ReportService`.
byte[] excelContent = reportService.generateExcelReport(employee);
StreamResource resource = new StreamResource(
employee.getFirstName() + "_" + employee.getLastName() + "_report.xlsx",
() -> new ByteArrayInputStream(excelContent)

View File

@ -127,7 +127,8 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
private final Button reportButton = new Button("Generar Ficha de Contratación");
private final Dialog dialog = new Dialog();
private final PdfViewer pdfViewer = new PdfViewer();
private final Button excelReportButton = new Button("Información General del Empleado Excel", VaadinIcon.FILE_TABLE.create());
private final Button excelReportButton = new Button("Información General del Empleado Excel",
VaadinIcon.FILE_TABLE.create());
private final H2 infoPer = new H2("Información Personal");
private final H3 infoGenr = new H3("Información General");
private final H5 imagenSub = new H5("Insertar una imagen .jpg:");

View File

@ -150,7 +150,7 @@ public class HoursWorkedView extends BeanValidationForm<HoursWorked> implements
});
}
private void updateEmployeeField(Team selectedTeam) {
private void updateEmployeeField(final Team selectedTeam) {
if (selectedTeam != null) {
List<Employee> employeesInTeam = employeeService.findAllEmployees().stream()
.filter(employee -> employee.getTeam() != null && employee.getTeam().equals(selectedTeam))