arreglar-funcionalidad #84

Merged
alex merged 14 commits from arreglar-funcionalidad into main 2024-11-28 02:52:23 +00:00
Showing only changes of commit c16405a8d8 - Show all commits

View File

@ -58,7 +58,8 @@ public class EmployeesListView extends BaseView {
Row headerRow = sheet.createRow(0); Row headerRow = sheet.createRow(0);
String[] headers = { String[] headers = {
"ID", "Nombres", "Apellidos", "Status", "Genero", "Fecha de Nacimiento", "Edad", "ID", "Nombres", "Apellidos", "Status", "Genero", "Fecha de Nacimiento", "Edad",
"Ciudad y Pais de Nacimiento", "Dirección de Residencia", "Departamento y Provincia de Residencia", "Marital Status", "Ciudad y Pais de Nacimiento", "Dirección de Residencia", "Departamento y Provincia de Residencia",
"Marital Status",
"Numero de Hijos", "CI", "Expedido en", "Teléfono", "E-mail", "Numero de Hijos", "CI", "Expedido en", "Teléfono", "E-mail",
"Teléfono Laboral", "E-mail Laboral", "Codigo de Empleado", "Cargo", "Teléfono Laboral", "E-mail Laboral", "Codigo de Empleado", "Cargo",
"Equipo", "Lead/Manager", "Fecha de Ingreso", "Fecha de Retiro", "Tipo de Contrato", "Equipo", "Lead/Manager", "Fecha de Ingreso", "Fecha de Retiro", "Tipo de Contrato",
@ -81,27 +82,38 @@ public class EmployeesListView extends BaseView {
row.createCell(2).setCellValue(employee.getLastName()); row.createCell(2).setCellValue(employee.getLastName());
row.createCell(3).setCellValue(employee.getStatus().toString()); row.createCell(3).setCellValue(employee.getStatus().toString());
row.createCell(4).setCellValue(employee.getGender() != null ? employee.getGender().toString() : ""); row.createCell(4).setCellValue(employee.getGender() != null ? employee.getGender().toString() : "");
row.createCell(5).setCellValue(employee.getBirthday() != null ? employee.getBirthday().toString() : ""); row.createCell(5).setCellValue(employee.getBirthday() != null ? employee.getBirthday()
.toString() : "");
row.createCell(6).setCellValue(employee.getAge() != null ? employee.getAge().toString() : ""); row.createCell(6).setCellValue(employee.getAge() != null ? employee.getAge().toString() : "");
row.createCell(7).setCellValue(employee.getBirthCity() != null ? employee.getBirthCity() : ""); row.createCell(7).setCellValue(employee.getBirthCity() != null ? employee.getBirthCity() : "");
row.createCell(8).setCellValue(employee.getResidenceAddress() != null ? employee.getResidenceAddress() : ""); row.createCell(8).setCellValue(employee.getResidenceAddress() != null ? employee
.getResidenceAddress() : "");
row.createCell(9).setCellValue(employee.getLocalAddress() != null ? employee.getLocalAddress() : ""); row.createCell(9).setCellValue(employee.getLocalAddress() != null ? employee.getLocalAddress() : "");
row.createCell(10).setCellValue(employee.getMaritalStatus() != null ? employee.getMaritalStatus().toString() : ""); row.createCell(10).setCellValue(employee.getMaritalStatus() != null ? employee.getMaritalStatus()
row.createCell(11).setCellValue(employee.getNumberOfChildren() != null ? employee.getNumberOfChildren().toString() : ""); .toString() : "");
row.createCell(11).setCellValue(employee.getNumberOfChildren() != null ? employee
.getNumberOfChildren().toString() : "");
row.createCell(12).setCellValue(employee.getCi() != null ? employee.getCi() : ""); row.createCell(12).setCellValue(employee.getCi() != null ? employee.getCi() : "");
row.createCell(13).setCellValue(employee.getIssuedIn() != null ? employee.getIssuedIn() : ""); row.createCell(13).setCellValue(employee.getIssuedIn() != null ? employee.getIssuedIn() : "");
row.createCell(14).setCellValue(employee.getPhoneNumber() != null ? employee.getPhoneNumber() : ""); row.createCell(14).setCellValue(employee.getPhoneNumber() != null ? employee.getPhoneNumber() : "");
row.createCell(15).setCellValue(employee.getPersonalEmail() != null ? employee.getPersonalEmail() : ""); row.createCell(15).setCellValue(employee.getPersonalEmail() != null ? employee
row.createCell(16).setCellValue(employee.getPhoneNumberProfesional() != null ? employee.getPhoneNumberProfesional() : ""); .getPersonalEmail() : "");
row.createCell(17).setCellValue(employee.getProfesionalEmail() != null ? employee.getProfesionalEmail() : ""); row.createCell(16).setCellValue(employee.getPhoneNumberProfesional() != null ? employee
.getPhoneNumberProfesional() : "");
row.createCell(17).setCellValue(employee.getProfesionalEmail() != null ? employee
.getProfesionalEmail() : "");
row.createCell(18).setCellValue(employee.getCod() != null ? employee.getCod() : ""); row.createCell(18).setCellValue(employee.getCod() != null ? employee.getCod() : "");
row.createCell(19).setCellValue(employee.getPosition() != null ? employee.getPosition() : ""); row.createCell(19).setCellValue(employee.getPosition() != null ? employee.getPosition() : "");
row.createCell(20).setCellValue(employee.getTeam() != null ? employee.getTeam().getName() : ""); row.createCell(20).setCellValue(employee.getTeam() != null ? employee.getTeam().getName() : "");
row.createCell(21).setCellValue(employee.getLeadManager() != null ? employee.getLeadManager() : ""); row.createCell(21).setCellValue(employee.getLeadManager() != null ? employee.getLeadManager() : "");
row.createCell(22).setCellValue(employee.getDateOfEntry() != null ? employee.getDateOfEntry().toString() : ""); row.createCell(22).setCellValue(employee.getDateOfEntry() != null ? employee.getDateOfEntry()
row.createCell(23).setCellValue(employee.getDateOfExit() != null ? employee.getDateOfExit().toString() : ""); .toString() : "");
row.createCell(24).setCellValue(employee.getContractType() != null ? employee.getContractType().toString() : ""); row.createCell(23).setCellValue(employee.getDateOfExit() != null ? employee.getDateOfExit()
row.createCell(25).setCellValue(employee.getCustomContractType() != null ? employee.getCustomContractType() : ""); .toString() : "");
row.createCell(24).setCellValue(employee.getContractType() != null ? employee.getContractType()
.toString() : "");
row.createCell(25).setCellValue(employee.getCustomContractType() != null ? employee
.getCustomContractType() : "");
row.createCell(26).setCellValue(employee.getSeniority() != null ? employee.getSeniority() : ""); row.createCell(26).setCellValue(employee.getSeniority() != null ? employee.getSeniority() : "");
row.createCell(27).setCellValue(employee.getSalarytotal() != null ? employee.getSalarytotal() : ""); row.createCell(27).setCellValue(employee.getSalarytotal() != null ? employee.getSalarytotal() : "");
} }
@ -132,6 +144,7 @@ public class EmployeesListView extends BaseView {
} }
private Button createAddEmployeeButton() { private Button createAddEmployeeButton() {
return createButton("Add Employee", this::navigateToAddEmployeeView); return createButton("Add Employee", this::navigateToAddEmployeeView);
} }
@ -144,6 +157,7 @@ public class EmployeesListView extends BaseView {
} }
private void navigateToAddEmployeeView() { private void navigateToAddEmployeeView() {
getUI().ifPresent(ui -> ui.navigate(EmployeeView.class, "new")); getUI().ifPresent(ui -> ui.navigate(EmployeeView.class, "new"));
} }