Allow changes to the reflection to be made after it's been submitted #13
@ -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() {
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user