En-desarrollo #59
@ -64,8 +64,14 @@ public class RequestRegisterView extends VerticalLayout {
|
||||
List<Employee> employees = employeeService.findAllEmployees();
|
||||
employeeComboBox.setItems(employees);
|
||||
employeeComboBox.setItemLabelGenerator(emp -> emp.getFirstName() + " " + emp.getLastName());
|
||||
categoryComboBox.setEnabled(false);
|
||||
categoryComboBox.setItems(TimeOffRequestType.values());
|
||||
categoryComboBox.addValueChangeListener(event -> updateAvailableDays(event.getValue()));
|
||||
employeeComboBox.addValueChangeListener(event -> {
|
||||
if (event.getValue() != null) {
|
||||
categoryComboBox.setEnabled(true);
|
||||
}
|
||||
});
|
||||
startDatePicker.addValueChangeListener(event -> updateDatePickerMinValues());
|
||||
endDatePicker.addValueChangeListener(event -> calculateDays());
|
||||
availableDaysField.setReadOnly(true);
|
||||
|
Loading…
Reference in New Issue
Block a user