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();
|
Project project = CriteriaPanel.this.getModelObject().getProject();
|
||||||
return reflectionService.getReflection(project, author.getObject());
|
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);
|
.map(Reflection.ImprovementsNeeded::commentBySupervisor);
|
||||||
|
|
||||||
add(new MultiLineLabel("improvementsNeeded", improvementsNeeded) {
|
add(new MultiLineLabel("improvementsNeeded", improvementsNeeded) {
|
||||||
@Override
|
@Override
|
||||||
protected void onConfigure() {
|
protected void onConfigure() {
|
||||||
|
@ -80,9 +80,9 @@ public class FinalStepsPanel extends GenericPanel<Project> {
|
|||||||
|
|
||||||
this.currentReflection = currentReflection;
|
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) {
|
add(new MultiLineLabel("old_reflection", oldReflection) {
|
||||||
@Override
|
@Override
|
||||||
protected void onConfigure() {
|
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
|
@Override
|
||||||
protected void onConfigure() {
|
protected void onConfigure() {
|
||||||
super.onConfigure();
|
super.onConfigure();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user