summary time calculation enhanced
This commit is contained in:
@ -7,7 +7,7 @@ plugins {
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
group = 'de.jottyfan'
|
||||
version = '1.4.7'
|
||||
version = '1.4.8'
|
||||
|
||||
description = """timetrack"""
|
||||
|
||||
|
@ -56,6 +56,11 @@ public class DoneController extends CommonController {
|
||||
SummaryBean sumBean = new SummaryBean(list, day, maxWorkTime);
|
||||
SummaryBean weekBean = new SummaryBean(week, day, maxWorkTime);
|
||||
model.addAttribute("doneList", list);
|
||||
Duration sumtimeDuration = Duration.ofMinutes(0);
|
||||
for (DoneBean bean : list) {
|
||||
sumtimeDuration = sumtimeDuration.plus(bean.getTimeDiffDuration());
|
||||
}
|
||||
model.addAttribute("sumtime", String.format("%02d:%02d", sumtimeDuration.toHours(), sumtimeDuration.toMinutes() % 60));
|
||||
model.addAttribute("sum", sumBean);
|
||||
model.addAttribute("daysum", doneService.getDaysum(day, username));
|
||||
model.addAttribute("overtimeBean", doneService.getOvertimeBean(username));
|
||||
|
@ -128,7 +128,7 @@
|
||||
<tr th:if="${daysum}">
|
||||
<td>Start: <span class="emphgreen" th:text="${#temporals.format(daysum.daytimeFrom, 'HH:mm')}" th:if="${daysum.daytimeFrom}"></span></td>
|
||||
<td>Ende: <span class="emphgreen" th:text="${#temporals.format(daysum.daytimeUntil, 'HH:mm')}" th:if="${daysum.daytimeUntil}"></span></td>
|
||||
<td>Arbeitszeit total: <span class="emphblue" th:text="${#temporals.format(daysum.dayworktime, 'HH:mm')}" th:if="${daysum.dayworktime}"></span></td>
|
||||
<td>abrechenbar: <span class="emphblue" th:text="${#temporals.format(daysum.dayworktime, 'HH:mm')}" th:if="${daysum.dayworktime}"></span>/<span th:text="${sumtime}"></span></td>
|
||||
<td>Pausezeit total: <span class="emphorange" th:text="${#temporals.format(daysum.breaks, 'HH:mm')}" th:if="${daysum.breaks}"></span></td>
|
||||
<td>Überstunden heute: <span class="emphred" th:text="${daysum.printDayOvertime()}"></span></td>
|
||||
<td colspan="2">Überstunden total: <span class="emphpink" th:text="${daysum.printTotalOvertime()}"></span></td>
|
||||
|
Reference in New Issue
Block a user