Skip to content

Commit 87edffa

Browse files
committed
add TODO
1 parent 13307a7 commit 87edffa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/de/focusshift/zeiterfassung/overtime/OvertimeServiceImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public Map<UserLocalId, OvertimeDuration> accumulatedOvertimeToDate(LocalDate da
3434
final Map<String, UserLocalId> localIdById = userManagementService.findAllUsersByLocalIds(userLocalIds).stream()
3535
.collect(toMap(user -> user.id().value(), User::localId));
3636

37-
final Map<String, List<TimeEntryBreakEntityView>> byUserIdValue = overtimeRepository.getWorkDurationsToDate(false, localIdById.keySet(), dateExclusive)
37+
// TODO create overtime snapshots (e.g. every month) so we don't have to read/calculate the whole past...
38+
// workDuration has to be considered with plannedWorkingHours to calculate the overtimeDuration. otherwise it's just... the actual worked hours...
3839
final Map<String, List<TimeEntryEntityDurationView>> byUserIdValue = overtimeRepository.getWorkDurationsToDate(false, localIdById.keySet(), dateExclusive)
3940
.stream()
4041
.collect(groupingBy(TimeEntryEntityDurationView::getUserId));

0 commit comments

Comments
 (0)