Correcciones
This commit is contained in:
parent
f2a1d53e4a
commit
13c81de48c
@ -10,6 +10,7 @@ public abstract class BaseEntity {
|
|||||||
@Id
|
@Id
|
||||||
@GeneratedValue(strategy = GenerationType.UUID)
|
@GeneratedValue(strategy = GenerationType.UUID)
|
||||||
private UUID id;
|
private UUID id;
|
||||||
|
@Enumerated(EnumType.STRING)
|
||||||
private Employee.Status status;
|
private Employee.Status status;
|
||||||
private String fileName;
|
private String fileName;
|
||||||
@Lob
|
@Lob
|
||||||
@ -64,11 +65,11 @@ public abstract class BaseEntity {
|
|||||||
return documentType;
|
return documentType;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setStatus(Employee.Status status) {
|
public void setStatusEmployee(Employee.Status status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Employee.Status getStatus() {
|
public Employee.Status getStatusEmployee() {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
private void saveEmployee() {
|
private void saveEmployee() {
|
||||||
if (validateForm()) {
|
if (validateForm()) {
|
||||||
Employee employee = getEntity();
|
Employee employee = getEntity();
|
||||||
employee.setStatus(status.getValue());
|
employee.setStatusEmployee(status.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));
|
||||||
@ -233,7 +233,7 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
|
|||||||
if ("edit".equals(action) && !s.isEmpty()) {
|
if ("edit".equals(action) && !s.isEmpty()) {
|
||||||
saveButton.setVisible(true);
|
saveButton.setVisible(true);
|
||||||
editButton.setVisible(false);
|
editButton.setVisible(false);
|
||||||
status.setValue(employee.getStatus());
|
status.setValue(employee.getStatusEmployee());
|
||||||
setFieldsEditable();
|
setFieldsEditable();
|
||||||
} else if ("view".equals(action) && !s.isEmpty()) {
|
} else if ("view".equals(action) && !s.isEmpty()) {
|
||||||
setFieldsReadOnly();
|
setFieldsReadOnly();
|
||||||
|
Loading…
Reference in New Issue
Block a user