From e870b3f20c518c0d1ed9ffdc68a7b256fb26fd6a Mon Sep 17 00:00:00 2001
From: honnel
Date: Wed, 16 Oct 2024 23:02:58 +0200
Subject: [PATCH 1/2] Add break information to day entry dto
---
.../de/focusshift/zeiterfassung/report/DetailDayEntryDto.java | 1 +
.../focusshift/zeiterfassung/report/ReportControllerHelper.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/main/java/de/focusshift/zeiterfassung/report/DetailDayEntryDto.java b/src/main/java/de/focusshift/zeiterfassung/report/DetailDayEntryDto.java
index 394b3e2d7..ff5ff70b8 100644
--- a/src/main/java/de/focusshift/zeiterfassung/report/DetailDayEntryDto.java
+++ b/src/main/java/de/focusshift/zeiterfassung/report/DetailDayEntryDto.java
@@ -10,6 +10,7 @@
record DetailDayEntryDto(
String username,
String comment,
+ boolean isBreak,
@DateTimeFormat(iso = TIME) LocalTime start,
@DateTimeFormat(iso = TIME) LocalTime end
) {
diff --git a/src/main/java/de/focusshift/zeiterfassung/report/ReportControllerHelper.java b/src/main/java/de/focusshift/zeiterfassung/report/ReportControllerHelper.java
index 7341bd5d9..ef1776379 100644
--- a/src/main/java/de/focusshift/zeiterfassung/report/ReportControllerHelper.java
+++ b/src/main/java/de/focusshift/zeiterfassung/report/ReportControllerHelper.java
@@ -177,7 +177,7 @@ private DetailDayDto toDetailDayReportDto(ReportDay reportDay, boolean different
}
private DetailDayEntryDto toDetailDayEntryDto(ReportDayEntry reportDayEntry) {
- return new DetailDayEntryDto(reportDayEntry.user().fullName(), reportDayEntry.comment(), reportDayEntry.start().toLocalTime(), reportDayEntry.end().toLocalTime());
+ return new DetailDayEntryDto(reportDayEntry.user().fullName(), reportDayEntry.comment(), reportDayEntry.isBreak(), reportDayEntry.start().toLocalTime(), reportDayEntry.end().toLocalTime());
}
private DetailDayAbsenceDto toDetailDayAbsenceDto(ReportDayAbsence reportDayAbsence, Locale locale) {
From 519183a5d6185f7e0c49323f027446dc93a85fc1 Mon Sep 17 00:00:00 2001
From: honnel
Date: Wed, 16 Oct 2024 23:03:15 +0200
Subject: [PATCH 2/2] Add coffee icon to visualize a break
fix #567
---
.../resources/templates/icons/coffee.html | 29 +++++++++++++++++++
.../templates/reports/user-report-week.html | 13 +++++++--
2 files changed, 39 insertions(+), 3 deletions(-)
create mode 100644 src/main/resources/templates/icons/coffee.html
diff --git a/src/main/resources/templates/icons/coffee.html b/src/main/resources/templates/icons/coffee.html
new file mode 100644
index 000000000..90ccbce2d
--- /dev/null
+++ b/src/main/resources/templates/icons/coffee.html
@@ -0,0 +1,29 @@
+
+
+
+
+ Title
+
+
+
+
+
diff --git a/src/main/resources/templates/reports/user-report-week.html b/src/main/resources/templates/reports/user-report-week.html
index c4315fc3e..53d4dd27a 100644
--- a/src/main/resources/templates/reports/user-report-week.html
+++ b/src/main/resources/templates/reports/user-report-week.html
@@ -424,9 +424,16 @@
>
-
+
+
+
+
+
+