adding more logging + working on displaying if a workday was submitted
Some checks failed
Tests / Run Go Tests (push) Failing after 1m55s
Some checks failed
Tests / Run Go Tests (push) Failing after 1m55s
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user