only add content to my projects if employee
This commit is contained in:
parent
6324bf1beb
commit
4a7d26e077
@ -2,18 +2,28 @@ package se.su.dsv.scipro.supervisor.pages;
|
||||
|
||||
import org.apache.wicket.PageParameters;
|
||||
|
||||
import org.apache.wicket.markup.html.panel.EmptyPanel;
|
||||
import org.apache.wicket.spring.injection.annot.SpringBean;
|
||||
import se.su.dsv.scipro.SciProSession;
|
||||
import se.su.dsv.scipro.springdata.services.EmployeeService;
|
||||
import se.su.dsv.scipro.supervisor.panels.SupervisorMyProjectsPanel;
|
||||
import se.su.dsv.scipro.supervisor.panels.SupervisorProjectsOverviewPanel;
|
||||
|
||||
public class SupervisorStartPage extends AbstractSupervisorPage {
|
||||
|
||||
public static final String MAIN_MENU_LABEL = "Supervisor";
|
||||
|
||||
@SpringBean
|
||||
private EmployeeService employeeService;
|
||||
|
||||
public SupervisorStartPage(PageParameters pp) {
|
||||
super(pp);
|
||||
// add(new SupervisorProjectsOverviewPanel("projectsOverviewPanel", SciProSession.get().getUser()));
|
||||
add(new SupervisorMyProjectsPanel("projectsOverviewPanel"));
|
||||
|
||||
if (employeeService.findByUser(SciProSession.get().getUser()) != null)
|
||||
add(new SupervisorMyProjectsPanel("projectsOverviewPanel"));
|
||||
else add(new EmptyPanel("projectsOverviewPanel"));
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user