fix: time calc errors with only one booking per day + working empty kurzarbeit fixed #74

This commit is contained in:
2026-02-06 17:52:57 +01:00
parent 6b0b8906a9
commit 38322a64cf
2 changed files with 15 additions and 5 deletions

View File

@@ -170,10 +170,12 @@ templ workDayWeekComponent(workDay *models.WorkDay) {
<div class="flex flex-row gap-2 items-center">
<span class="icon-[material-symbols-light--schedule-outline] flex-shrink-0"></span>
switch {
case !workDay.TimeFrom.Equal(workDay.TimeTo):
case !workDay.IsEmpty():
<span>{ workDay.TimeFrom.Format("15:04") }</span>
<span>-</span>
<span>{ workDay.TimeTo.Format("15:04") }</span>
case workDay.IsKurzArbeit():
<span>Kurzarbeit</span>
default:
<p>Keine Anwesenheit</p>
}