adding more logging + working on displaying if a workday was submitted
Some checks failed
Tests / Run Go Tests (push) Failing after 1m55s

This commit is contained in:
2025-10-14 01:05:02 +02:00
parent 5001f24d9b
commit 0d7696cbc6
15 changed files with 146 additions and 62 deletions

View File

@@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"log"
"log/slog"
"sort"
"time"
)
@@ -110,6 +111,7 @@ func (d *WorkDay) TimeWorkReal(u User) time.Duration {
if helper.IsSameDate(d.Date(), time.Now()) && len(d.Bookings)%2 == 1 {
d.realWorkTime += time.Since(lastBooking.Timestamp.Local())
}
slog.Debug("Calculated RealWorkTime for user", "user", u, slog.String("worktime", d.realWorkTime.String()))
return d.realWorkTime
}