#4 Perfil de Empleado - Detalles para formulario de Empleado
All checks were successful
PR Builder / Build-PR (pull_request) Successful in 2m27s

This commit is contained in:
Melina Gutierrez 2024-10-04 13:26:10 -04:00
parent 4ae2badb7b
commit 6316230a2a
3 changed files with 21 additions and 7 deletions

View File

@ -25,6 +25,7 @@
private String age; private String age;
private String residenceAddress; private String residenceAddress;
private String localAddress;
private String phoneNumber; private String phoneNumber;
private String personalEmail; private String personalEmail;
private String position; private String position;
@ -34,7 +35,6 @@
private String emergencyCPhone; private String emergencyCPhone;
private String emergencyCEmail; private String emergencyCEmail;
private String numberOfChildren; private String numberOfChildren;
private String departmentAndProvinceResidence;
private String ci; private String ci;
private String issuedIn; private String issuedIn;
@ -66,8 +66,8 @@
private LocalDate dateOfExit; private LocalDate dateOfExit;
private String contractType; private String contractType;
private Integer seniority; private String seniority;
private Double salary; private String salary;
private String bankName; private String bankName;
private String accountNumber; private String accountNumber;

View File

@ -173,6 +173,7 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
int birthYear = birthday.getValue().getYear(); int birthYear = birthday.getValue().getYear();
int ages = currentYear - birthYear; int ages = currentYear - birthYear;
age.setValue(String.valueOf(ages)); age.setValue(String.valueOf(ages));
System.out.println(age);
} }
} }
@ -285,6 +286,8 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
if (validateForm()) { if (validateForm()) {
Employee employee = getEntity(); Employee employee = getEntity();
employee.setStatus(status.getValue()); employee.setStatus(status.getValue());
employee.setAge(age.getValue());
employeeService.createOrUpdate(employee); employeeService.createOrUpdate(employee);
Notification.show(NOTIFICATION_SAVE_SUCCESS); Notification.show(NOTIFICATION_SAVE_SUCCESS);
getUI().ifPresent(ui -> ui.navigate(EmployeesListView.class)); getUI().ifPresent(ui -> ui.navigate(EmployeesListView.class));

View File

@ -28,6 +28,7 @@
</head> </head>
<body> <body>
<div style="clear:both;"></div> <div style="clear:both;"></div>
<h2>FICHA DE CONTRATACIÓN</h2>
<h3>Información General</h3> <h3>Información General</h3>
<table> <table>
<tr> <tr>
@ -55,10 +56,14 @@
<td>${maritalStatus!""}</td> <td>${maritalStatus!""}</td>
<td>Nro. CI:</td> <td>Nro. CI:</td>
<td>${ci!""}</td> <td>${ci!""}</td>
<td>Expedido en:</td>
<td>${issuedIn!""}</td>
</tr> </tr>
<tr> <tr>
<td>Nro. Hijos:</td> <td>Nro. Hijos:</td>
<td>${numberOfChildren!""}</td> <td>${numberOfChildren!""}</td>
</tr>
<tr>
<td>Nro. Celular:</td> <td>Nro. Celular:</td>
<td>${phoneNumber!""}</td> <td>${phoneNumber!""}</td>
</tr> </tr>
@ -66,13 +71,11 @@
<td>Email:</td> <td>Email:</td>
<td>${personalEmail!""}</td> <td>${personalEmail!""}</td>
</tr> </tr>
</table>
<h3>Información de Contratación</h3>
<table>
<tr> <tr>
<td>Código de Empleado:</td> <td>Código de Empleado:</td>
<td>${cod!""}</td> <td>${cod!""}</td>
</tr>
<tr>
<td>Cargo:</td> <td>Cargo:</td>
<td>${position!""}</td> <td>${position!""}</td>
</tr> </tr>
@ -80,9 +83,15 @@
<td>Equipo:</td> <td>Equipo:</td>
<td>${team!""}</td> <td>${team!""}</td>
</tr> </tr>
</table>
<h3>Información de Contratación</h3>
<table>
<tr> <tr>
<td>Fecha de Ingreso:</td> <td>Fecha de Ingreso:</td>
<td>${dateOfEntry!""}</td> <td>${dateOfEntry!""}</td>
</tr>
<tr>
<td>Tipo de Contrato:</td> <td>Tipo de Contrato:</td>
<td>${contractType!""}</td> <td>${contractType!""}</td>
</tr> </tr>
@ -97,6 +106,8 @@
<tr> <tr>
<td>Banco:</td> <td>Banco:</td>
<td>${bankName!""}</td> <td>${bankName!""}</td>
</tr>
<tr>
<td>Nro. Cuenta:</td> <td>Nro. Cuenta:</td>
<td>${accountNumber!""}</td> <td>${accountNumber!""}</td>
</tr> </tr>