Skip to content

Commit

Permalink
remove obsolete dto attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
bseber committed Oct 11, 2024
1 parent 9493d77 commit 6de96d6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package de.focusshift.zeiterfassung.report;

import java.time.Duration;
import java.util.List;

record DetailDayDto(
boolean differentMonth,
String dayOfWeek,
String dayOfWeekFull,
String date,
Duration hoursWorked, /* todo remove maybe? */
String workedWorkingHours,
String shouldWorkingHours,
String hoursDelta,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ private DetailDayDto toDetailDayReportDto(ReportDay reportDay, boolean different
final String dayOfWeekNarrow = dateFormatter.formatDayOfWeekNarrow(reportDay.date().getDayOfWeek());
final String dayOfWeekFull = dateFormatter.formatDayOfWeekFull(reportDay.date().getDayOfWeek());
final String dateString = dateFormatter.formatDate(reportDay.date());
final Duration hoursWorked = reportDay.workDuration().duration();
final List<DetailDayEntryDto> dayEntryDtos = reportDay.reportDayEntries().stream().map(this::toDetailDayEntryDto).toList();

final List<DetailDayAbsenceDto> detailDayAbsenceDto = reportDay.detailDayAbsencesByUser().values().stream()
Expand All @@ -174,7 +173,7 @@ private DetailDayDto toDetailDayReportDto(ReportDay reportDay, boolean different
final Duration deltaDuration = workDuration.duration().minus(shouldWorkingHours.duration());
final String deltaHours = durationToTimeString(deltaDuration);

return new DetailDayDto(differentMonth, dayOfWeekNarrow, dayOfWeekFull, dateString, hoursWorked, workedWorkingHoursString, shouldWorkingHoursString, deltaHours, deltaDuration.isNegative(), dayEntryDtos, detailDayAbsenceDto);
return new DetailDayDto(differentMonth, dayOfWeekNarrow, dayOfWeekFull, dateString, workedWorkingHoursString, shouldWorkingHoursString, deltaHours, deltaDuration.isNegative(), dayEntryDtos, detailDayAbsenceDto);
}

private DetailDayEntryDto toDetailDayEntryDto(ReportDayEntry reportDayEntry) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import org.threeten.extra.YearWeek;

import java.time.Clock;
import java.time.Duration;
import java.time.LocalDate;
import java.time.LocalTime;
import java.time.Year;
Expand Down Expand Up @@ -180,7 +179,7 @@ void ensureReportWeekWithAbsences() throws Exception {
Date.from(ZonedDateTime.of(LocalDate.of(2023, 2,5), LocalTime.MIN, ZoneId.systemDefault()).toInstant()),
5,
List.of(
new DetailDayDto(true, "F", "Freitag", "03.02.2023", Duration.ZERO, "00:00", "00:00", "00:00", false, List.of(),
new DetailDayDto(true, "F", "Freitag", "03.02.2023", "00:00", "00:00", "00:00", false, List.of(),
List.of(
new DetailDayAbsenceDto(
"Bruce Wayne",
Expand Down

0 comments on commit 6de96d6

Please sign in to comment.