From 457e0d18201863104815bf6de9c85f02967a75de Mon Sep 17 00:00:00 2001 From: honnel Date: Wed, 3 Apr 2024 23:01:25 +0200 Subject: [PATCH] Show if person works on public holiday --- .../usermanagement/WorkingTimeController.java | 1 + .../usermanagement/WorkingTimeListEntryDto.java | 1 + .../usermanagement/user/working-time-settings.html | 12 ++++++++++-- .../usermanagement/WorkingTimeControllerTest.java | 7 +++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeController.java b/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeController.java index d23afac94..31e1b116b 100644 --- a/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeController.java +++ b/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeController.java @@ -365,6 +365,7 @@ private WorkingTimeListEntryDto workingTimeListEntryDto(WorkingTime workingTime) workingTime.isCurrent(), workingTime.validFrom().isPresent(), federalStateMessageKey, + workingTime.worksOnPublicHoliday(), workingTime.getMonday().hoursDoubleValue(), workingTime.getTuesday().hoursDoubleValue(), workingTime.getWednesday().hoursDoubleValue(), diff --git a/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeListEntryDto.java b/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeListEntryDto.java index 54cfc0862..68c7de807 100644 --- a/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeListEntryDto.java +++ b/src/main/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeListEntryDto.java @@ -12,6 +12,7 @@ record WorkingTimeListEntryDto( boolean isCurrent, boolean isDeletable, String federalStateMessageKey, + boolean worksOnPublicHoliday, Double workingTimeMonday, Double workingTimeTuesday, Double workingTimeWednesday, diff --git a/src/main/resources/templates/usermanagement/user/working-time-settings.html b/src/main/resources/templates/usermanagement/user/working-time-settings.html index 700c9e661..cd27e43d0 100644 --- a/src/main/resources/templates/usermanagement/user/working-time-settings.html +++ b/src/main/resources/templates/usermanagement/user/working-time-settings.html @@ -91,6 +91,9 @@ + + (arbeitet an Feiertagen) +
-

- Baden-Württemberg +

+ + Baden-Württemberg + + + (arbeitet an Feiertagen) +

diff --git a/src/test/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeControllerTest.java b/src/test/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeControllerTest.java index ced6d7ae1..7fe9f4e58 100644 --- a/src/test/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeControllerTest.java +++ b/src/test/java/de/focusshift/zeiterfassung/usermanagement/WorkingTimeControllerTest.java @@ -125,6 +125,7 @@ void ensureSimpleGet() throws Exception { true, false, "federalState.GERMANY_BADEN_WUERTTEMBERG", + false, 8.0, 8.0, 8.0, @@ -314,6 +315,7 @@ void ensureSimpleGetJavaScript() throws Exception { true, false, "federalState.GERMANY_BADEN_WUERTTEMBERG", + false, 8.0, 8.0, 8.0, @@ -372,6 +374,7 @@ void ensureSimpleGetForWorkingTimeWithSpecialWorkingDays() throws Exception { true, false, "federalState.GERMANY_BADEN_WUERTTEMBERG", + false, 4.0, 0d, 5.0, @@ -428,6 +431,7 @@ void ensureSearch() throws Exception { true, false, "federalState.GERMANY_BADEN_WUERTTEMBERG", + false, 8.0, 8.0, 8.0, @@ -487,6 +491,7 @@ void ensureSearchJavaScript() throws Exception { true, false, "federalState.GERMANY_BADEN_WUERTTEMBERG", + false, 8.0, 8.0, 8.0, @@ -554,6 +559,7 @@ void ensureSearchWithSelectedUserNotInQuery() throws Exception { true, false, "federalState.GERMANY_BADEN_WUERTTEMBERG", + false, 8.0, 8.0, 8.0, @@ -620,6 +626,7 @@ void ensureSearchWithSelectedUserNotInQueryJavaScript() throws Exception { true, false, "federalState.GERMANY_BADEN_WUERTTEMBERG", + false, 8.0, 8.0, 8.0,