Fix the bug on the pagination symbol on the feedback page
What does this mr do?
Closes #704 (closed) The arrow symbol is now the same on the last page.
To Test
To setup the feedback page to have enough feedback for pagination, you can use the following to temporarily be able to see enough feedback:
In FeedbackRepository, remove the constraint for anonymous feedback:
default List<Feedback> findByAssistantAnonymised(Long assistantId) {
return findByAssistantCreatedBeforeAndSkipSome(assistantId, LocalDateTime.now(), 0);
}
Some temporary rough code to insert enough feedback in DevDatabaseLoader under initFeedback():
var student = oopStudents.get(0);
for (int i = 0; i < 42; i++) {
var r1 = rr.save(LabRequest.builder()
.requestType(QUESTION)
.comment("What should I do here?")
.question("Ah well")
.timeSlot(null)
.assignment(oopNowModuleA.getAssignments().get(0).getId())
.room(rooms.get(0).getId())
.session(oopL1)
.requester(student.getId())
.studentGroup(rs.getOrCreateIndividualStudentGroup(
oopL1.getId(), student.getId(), oopNowModuleA.getId()).getId())
.build());
rer.applyAndSave(new RequestApprovedEvent(r1, assistant2.getId(), ""));
lrr.save(r1);
fr.save(Feedback.builder()
.id(new Feedback.Id(r1.getId(), assistant2.getId()))
.request(r1)
.feedback("ya" + i)
.rating(2)
.createdAt(LocalDateTime.now().minusYears(1).plusMinutes(4))
.lastUpdatedAt(LocalDateTime.now().minusYears(1).plusMinutes(4))
.build());
}
csestudent1 should now have enough feedback to see the pages.
Edited by Ada Turgut