Skip to content
Snippets Groups Projects
Commit 84b5c98b authored by Otto Visser's avatar Otto Visser
Browse files

Merge branch 'show-past-labs-on-calendar' into 'development'

Show past labs on calendar

See merge request !638
parents 9dc7a8a0 7a152353
Branches
Tags
2 merge requests!642Release 2.1.1,!638Show past labs on calendar
......@@ -19,6 +19,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Feedback y-axis no longer has labels on increments of 1 [@rwbackx](https://gitlab.ewi.tudelft.nl/rwbackx)
- Request Table Pagination is fixed. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
- Lab stats page now shows the lab dates [@rwbackx](https://gitlab.ewi.tudelft.nl/rwbackx)
- Request Table Pagination is fixed. [@hpage](https://gitlab.ewi.tudelft.nl/hpage)
- Past labs are now shown on the calendar. [@rwbackx](https://gitlab.ewi.tudelft.nl/rwbackx)
### Deprecated
......
......@@ -167,10 +167,10 @@ public class HomeController {
.stream()
.collect(Collectors.toMap(EditionDetailsDTO::getId, Function.identity()));
var sessions = sCache.get(editions.values().stream()
Set<SessionDetailsDTO> sessions = new HashSet<>(sCache.get(editions.values().stream()
.flatMap(e -> e.getSessions().stream())
.filter(s -> s.getEnd().isAfter(now))
.map(SessionSummaryDTO::getId)).stream().collect(Collectors.toSet());
.filter(s -> s.getEnd().isAfter(now.minusMonths(1)))
.map(SessionSummaryDTO::getId)));
var sharedEditions = editions.values().stream().map(EditionDetailsDTO::getEditionCollections)
.flatMap(List::stream).map(e -> ecCache.getOrThrow(e.getId()))
......@@ -180,6 +180,7 @@ public class HomeController {
lr.findAllBySessions(
sessions.stream().map(SessionDetailsDTO::getId).collect(Collectors.toList())));
sessions = sessions.stream().filter(s -> s.getEnd().isAfter(now)).collect(Collectors.toSet());
var labs = sessions.stream().collect(Collectors.toMap(SessionDetailsDTO::getId,
s -> es.sortLabs(View.convert(lr.findAllBySessions(List.of(s.getId())),
QueueSessionSummaryDTO.class)).stream()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment