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 4 additions and 1 deletions
Showing only changes of commit 7ec355718b - Show all commits

View File

@ -113,7 +113,7 @@ public class FinalStepsPanel extends GenericPanel<Project> {
IModel<PublishingConsentService.PublishingConsent> publishingConsent = LoadableDetachableModel.of(() ->
publishingConsentService.getPublishingConsent(getModelObject(), SciProSession.get().getUser()));
levelModel = new Model<>();
levelModel = new Model<>(publishingConsent.getObject().selected());
FormComponent<PublishingConsentService.Level> publishingConsentLevel = new BootstrapRadioChoice<>(
"publishingConsentLevel",
levelModel,

View File

@ -143,6 +143,7 @@ import java.util.*;
import static org.mockito.ArgumentMatchers.*;
import static org.mockito.Mockito.lenient;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
@ExtendWith(MockitoExtension.class)
public abstract class SciProTest {
@ -391,6 +392,8 @@ public abstract class SciProTest {
publicationMetadata.setProject(answer.getArgument(0));
return publicationMetadata;
});
lenient().when(publishingConsentService.getPublishingConsent(any(), any()))
.thenReturn(new PublishingConsentService.PublishingConsent(null, List.of()));
}
@BeforeEach