3262 Improve information available to students about their ideas
Show when the course starts Better status message when it's not yet matched to a supervisor
This commit is contained in:
parent
44aa894322
commit
17306630c5
@ -106,7 +106,25 @@ public class ProjectMyIdeasPanel extends Panel {
|
||||
columns.add(new AbstractColumn<>(Model.of("Status"), "match.status") {
|
||||
@Override
|
||||
public void populateItem(Item<ICellPopulator<Idea>> item, String id, IModel<Idea> model) {
|
||||
item.add(new StudentIdeaStatusColumnPanel(id, model));
|
||||
item.add(new Label(id, model.map(idea -> switch (idea.getMatchStatus()) {
|
||||
case UNMATCHED -> "Submitted, waiting for matching by administrator";
|
||||
case MATCHED -> {
|
||||
if (applicationPeriodService.courseStartHasPassed(idea.getApplicationPeriod())) {
|
||||
yield "Matched, project creation delayed. This is under investigation and handled manually. No action needed from you.";
|
||||
} else {
|
||||
yield "Matched, awaiting course start date";
|
||||
}
|
||||
}
|
||||
case COMPLETED -> "Matched, project started";
|
||||
case INACTIVE -> "Inactive";
|
||||
})));
|
||||
}
|
||||
});
|
||||
|
||||
columns.add(new AbstractColumn<>(Model.of("Course start date")) {
|
||||
@Override
|
||||
public void populateItem(Item<ICellPopulator<Idea>> item, String id, IModel<Idea> iModel) {
|
||||
item.add(new Label(id, iModel.map(Idea::getApplicationPeriod).map(ApplicationPeriod::getCourseStartDate)));
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user