Deadline visible in "Rough draft approval" page

Previously deadline was only visible at the Reviewer start page, tab 'Rough draft approvals'.

Now the deadline is also shown when you go to the detail page of a rough draft.

Fixes issue 
This commit is contained in:
Nico Athanassiadis 2025-02-11 11:31:24 +01:00
parent 219c312441
commit 6ca6c63743
3 changed files with 9 additions and 0 deletions
view/src
main/java/se/su/dsv/scipro/supervisor/panels
test/java/se/su/dsv/scipro/supervisor/panels

@ -4,6 +4,7 @@
<wicket:panel>
<strong>Current thesis:</strong> <span wicket:id="currentThesis">[thesis.pdf (2014-08-08)]</span><br>
<strong>Status:</strong> <span wicket:id="currentStatus">[Undecided]</span> <br>
<strong>Deadline:</strong> <span wicket:id="deadline">[Undecided]</span> <br>
<strong>Supervisor comment:</strong> <span wicket:id="currentDecision.comment">[Undecided]</span> <br>
<wicket:enclosure>
<strong>Reason:</strong> <span wicket:id="currentReason">[I need more time]</span><br>

@ -28,6 +28,7 @@ public class FinalSeminarApprovalProcessPanel extends GenericPanel<ReviewerAppro
)
);
add(new EnumLabel<>("currentStatus", process.map(ReviewerApproval::getCurrentStatus)));
add(new DateLabel("deadline", process.map(ReviewerApproval::getCurrentDeadline)));
add(
new MultiLineLabel(
"currentDecision.comment",

@ -10,6 +10,7 @@ import org.apache.wicket.model.LoadableDetachableModel;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import se.su.dsv.scipro.SciProTest;
import se.su.dsv.scipro.components.DateLabel;
import se.su.dsv.scipro.file.FileDescription;
import se.su.dsv.scipro.file.FileReference;
import se.su.dsv.scipro.project.Project;
@ -44,6 +45,12 @@ public class FinalSeminarApprovalProcessPanelTest extends SciProTest {
tester.assertModelValue(path(panel, "currentStatus"), finalSeminarApproval.getCurrentStatus());
}
@Test
public void shows_deadline() {
tester.assertComponent(path(panel, "deadline"), DateLabel.class);
tester.assertModelValue(path(panel, "deadline"), finalSeminarApproval.getCurrentDeadline());
}
@Test
public void shows_current_reason_if_a_decision_has_been_made() {
startPanelWithApprovedFinalSeminar();