Allow supervisors to write a note associated with their projects #8

Merged
ansv7779 merged 10 commits from 3399-supervisor-project-note into develop 2024-07-10 13:43:27 +02:00
Showing only changes of commit 0ffe1bd79a - Show all commits

View File

@ -97,16 +97,16 @@ public class ProjectNoteColumn extends AbstractExportableColumn<Project, String>
}
private class ViewAndEditNoteForm extends GenericPanel<Project> {
ansv7779 marked this conversation as resolved
Review

Rename model.getObject to projectModel.getObject ?

Would make it more readable and conform with the projectNoteService.setUserNote method.

Rename model.getObject to projectModel.getObject ? Would make it more readable and conform with the projectNoteService.setUserNote method.
public ViewAndEditNoteForm(String id, IModel<Project> model) {
super(id, model);
public ViewAndEditNoteForm(String id, IModel<Project> project) {
super(id, project);
IModel<String> note = getDataModel(model);
IModel<String> note = getDataModel(project);
Form<Project> form = new Form<>("form", model) {
Form<Project> form = new Form<>("form", project) {
@Override
protected void onSubmit() {
projectNoteService.setUserNote(
model.getObject(),
project.getObject(),
user.getObject(),
note.getObject()
);