Allow changes to the reflection to be made after it's been submitted #13

Merged
ansv7779 merged 20 commits from 3412-supervisor-edit-reflection into develop 2024-11-21 19:20:48 +01:00
2 changed files with 6 additions and 4 deletions
Showing only changes of commit 7f613a17ad - Show all commits

View File

@ -270,8 +270,10 @@ public class CriteriaPanel extends GenericPanel<SupervisorGradingReport> {
Project project = CriteriaPanel.this.getModelObject().getProject();
return reflectionService.getReflection(project, author.getObject());
});
IModel<String> improvementsNeeded = reflection.as(Reflection.ImprovementsNeeded.class)
IModel<String> improvementsNeeded = reflection
.as(Reflection.ImprovementsNeeded.class)
.map(Reflection.ImprovementsNeeded::commentBySupervisor);
add(new MultiLineLabel("improvementsNeeded", improvementsNeeded) {
@Override
protected void onConfigure() {

View File

@ -80,9 +80,9 @@ public class FinalStepsPanel extends GenericPanel<Project> {
this.currentReflection = currentReflection;
IModel<Reflection.ImprovementsNeeded> i = this.currentReflection.as(Reflection.ImprovementsNeeded.class);
IModel<Reflection.ImprovementsNeeded> improvementsNeeded = this.currentReflection.as(Reflection.ImprovementsNeeded.class);
IModel<String> oldReflection = i.map(Reflection.ImprovementsNeeded::oldReflection);
IModel<String> oldReflection = improvementsNeeded.map(Reflection.ImprovementsNeeded::oldReflection);
add(new MultiLineLabel("old_reflection", oldReflection) {
@Override
protected void onConfigure() {
@ -91,7 +91,7 @@ public class FinalStepsPanel extends GenericPanel<Project> {
}
});
add(new MultiLineLabel("supervisor_comment", i.map(Reflection.ImprovementsNeeded::commentBySupervisor)) {
add(new MultiLineLabel("supervisor_comment", improvementsNeeded.map(Reflection.ImprovementsNeeded::commentBySupervisor)) {
@Override
protected void onConfigure() {
super.onConfigure();