src/main/java/ubu/digit/ui/views/ActiveProjectsView.java
private void createFilters() {
		H1 filtersTitle = new H1(FILTROS);
		filtersTitle.addClassName(TITLE_STYLE);
		add(filtersTitle);

		HorizontalLayout filters = new HorizontalLayout();
		filters.setSpacing(true);
		filters.setMargin(false);
		
		projectFilter = new TextField("Filtrar por proyectos:");
		projectFilter.setWidth("300px");
		projectFilter.addValueChangeListener(event -> {
			if(!projectFilter.isEmpty()) {
				applyFilter("title", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});

		descriptionFilter = new TextField("Filtrar por descripción:");
		descriptionFilter.setWidth("300px");
		descriptionFilter.addValueChangeListener(event -> {
			if(!descriptionFilter.isEmpty()) {
				applyFilter("description", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});

		tutorsFilter = new TextField("Filtrar por tutores:");
		tutorsFilter.setWidth("300px");
		tutorsFilter.addValueChangeListener(event -> {
			if(!tutorsFilter.isEmpty()) {
				applyFilter("tutor", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});

		studentsFilter = new TextField("Filtrar por alumnos:");
		studentsFilter.setWidth("300px");
		studentsFilter.addValueChangeListener(event -> {
			if(!studentsFilter.isEmpty()) {
				applyFilter("student", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});

		courseFilter = new TextField("Filtrar por curso:");
		courseFilter.setWidth("300px");
		courseFilter.addValueChangeListener(event -> {
			if(!courseFilter.isEmpty()) {
				applyFilter("course", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});
		
		filters.add(projectFilter, descriptionFilter, tutorsFilter, studentsFilter, courseFilter);
		add(filters);
	}
/**
	 * Crea los filtros de la tabla.
	 */
Crea los filtros de la tabla.
Crea los filtros de la tabla .
private void createFilters() {
		H1 filtersTitle = new H1(FILTROS);
		filtersTitle.addClassName(TITLE_STYLE);
		add(filtersTitle);
		HorizontalLayout filters = new HorizontalLayout();
		filters.setSpacing(true);
		filters.setMargin(false);
		projectFilter = new TextField("Filtrar por proyectos:");
		projectFilter.setWidth("300px");
		projectFilter.addValueChangeListener(event -> {
			if(!projectFilter.isEmpty()) {
				applyFilter("title", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});
		descriptionFilter = new TextField("Filtrar por descripción:");
		descriptionFilter.setWidth("300px");
		descriptionFilter.addValueChangeListener(event -> {
			if(!descriptionFilter.isEmpty()) {
				applyFilter("description", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});
		tutorsFilter = new TextField("Filtrar por tutores:");
		tutorsFilter.setWidth("300px");
		tutorsFilter.addValueChangeListener(event -> {
			if(!tutorsFilter.isEmpty()) {
				applyFilter("tutor", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});
		studentsFilter = new TextField("Filtrar por alumnos:");
		studentsFilter.setWidth("300px");
		studentsFilter.addValueChangeListener(event -> {
			if(!studentsFilter.isEmpty()) {
				applyFilter("student", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});
		courseFilter = new TextField("Filtrar por curso:");
		courseFilter.setWidth("300px");
		courseFilter.addValueChangeListener(event -> {
			if(!courseFilter.isEmpty()) {
				applyFilter("course", event.getValue());
			}else {
				table.setItems(dataActiveProjectsGrid);
			}
		});
		filters.add(projectFilter, descriptionFilter, tutorsFilter, studentsFilter, courseFilter);
		add(filters);
	}
private void createFilters ( ) { H1 filtersTitle = new H1 ( FILTROS ) ; filtersTitle . addClassName ( TITLE_STYLE ) ; add ( filtersTitle ) ; HorizontalLayout filters = new HorizontalLayout ( ) ; filters . setSpacing ( true ) ; filters . setMargin ( false ) ; projectFilter = new TextField ( "Filtrar por proyectos:" ) ; projectFilter . setWidth ( "300px" ) ; projectFilter . addValueChangeListener ( event -> { if ( ! projectFilter . isEmpty ( ) ) { applyFilter ( "title" , event . getValue ( ) ) ; } else { table . setItems ( dataActiveProjectsGrid ) ; } } ) ; descriptionFilter = new TextField ( "Filtrar por descripción:") ; descriptionFilter . setWidth ( "300px" ) ; descriptionFilter . addValueChangeListener ( event -> { if ( ! descriptionFilter . isEmpty ( ) ) { applyFilter ( "description" , event . getValue ( ) ) ; } else { table . setItems ( dataActiveProjectsGrid ) ; } } ) ; tutorsFilter = new TextField ( "Filtrar por tutores:" ) ; tutorsFilter . setWidth ( "300px" ) ; tutorsFilter . addValueChangeListener ( event -> { if ( ! tutorsFilter . isEmpty ( ) ) { applyFilter ( "tutor" , event . getValue ( ) ) ; } else { table . setItems ( dataActiveProjectsGrid ) ; } } ) ; studentsFilter = new TextField ( "Filtrar por alumnos:" ) ; studentsFilter . setWidth ( "300px" ) ; studentsFilter . addValueChangeListener ( event -> { if ( ! studentsFilter . isEmpty ( ) ) { applyFilter ( "student" , event . getValue ( ) ) ; } else { table . setItems ( dataActiveProjectsGrid ) ; } } ) ; courseFilter = new TextField ( "Filtrar por curso:" ) ; courseFilter . setWidth ( "300px" ) ; courseFilter . addValueChangeListener ( event -> { if ( ! courseFilter . isEmpty ( ) ) { applyFilter ( "course" , event . getValue ( ) ) ; } else { table . setItems ( dataActiveProjectsGrid ) ; } } ) ; filters . add ( projectFilter , descriptionFilter , tutorsFilter , studentsFilter , courseFilter ) ; add ( filters ) ; }
Crea los filtros de la tabla.
Crea los filtros de la tabla .