added to not show inactive areas in employee profiles
This commit is contained in:
parent
aedf8c01ca
commit
af00f4ffca
src/main/java/se/su/dsv/scipro
springdata
supervisor/panels
@ -1,5 +1,7 @@
|
||||
package se.su.dsv.scipro.springdata.repos;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.querydsl.QueryDslPredicateExecutor;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -10,5 +12,6 @@ import se.su.dsv.scipro.data.dataobjects.ResearchArea;
|
||||
public interface ResearchAreaRepo extends JpaRepository<ResearchArea, Long>, QueryDslPredicateExecutor<ResearchArea> {
|
||||
|
||||
public ResearchArea findByIdentifier(Long identifier);
|
||||
public List<ResearchArea> findByDeleted(boolean deleted);
|
||||
|
||||
}
|
||||
|
@ -51,4 +51,9 @@ public class ResearchAreaServiceImpl extends AbstractQueryService<ResearchArea,
|
||||
public void deleteArea(ResearchArea area) {
|
||||
researchAreaRepo.delete(area);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ResearchArea> findAll(boolean includeDeleted) {
|
||||
return researchAreaRepo.findByDeleted(includeDeleted);
|
||||
}
|
||||
}
|
||||
|
@ -14,6 +14,7 @@ public interface ResearchAreaService extends GenericService<ResearchArea, Long>,
|
||||
public ResearchArea findByIdentifier(Long identifier);
|
||||
public Set<ResearchArea> findAllAsSet();
|
||||
public List<ResearchArea> findAllAsList();
|
||||
public List<ResearchArea> findAll(boolean includeDeleted);
|
||||
void deleteArea(ResearchArea area);
|
||||
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class ProfilePanel extends Panel {
|
||||
|
||||
add(new Label("emptylabel", "You do not have any active/existing research areas selected in Daisy. Please make sure that you select at least one active/existing research area in Daisy ASAP.").setVisible(employeeModel.getObject().getResearchAreas() == null || employeeModel.getObject().getResearchAreas().isEmpty() || !atLeastOneActive));
|
||||
|
||||
ListView<ResearchArea> areaListView = new ListView<ResearchArea>("arealistview", new ArrayList<ResearchArea>(areaService.findAllAsList())){
|
||||
ListView<ResearchArea> areaListView = new ListView<ResearchArea>("arealistview", new ArrayList<ResearchArea>(areaService.findAll(false))){
|
||||
private static final long serialVersionUID = 1L;
|
||||
@Override
|
||||
protected void populateItem(ListItem<ResearchArea> item) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user