Empleado con las revisiones

This commit is contained in:
Melina Gutierrez 2024-11-23 16:43:42 -04:00
parent 7187b75fff
commit cdb53c3766

View File

@ -248,11 +248,7 @@ public class EmployeeView extends BeanValidationForm<Employee> implements HasUrl
int birthYear = birthday.getValue().getYear();
int ages = currentYear - birthYear;
age.setValue(String.valueOf(ages));
if (ages < 18) {
birthday.setInvalid(true);
} else {
birthday.setInvalid(false);
}
birthday.setInvalid(ages < 18);
System.out.println(age);
}
}