fix: calc worktime, when nothing is set
Some checks failed
Tests / Run Go Tests (push) Failing after 1m32s
Some checks failed
Tests / Run Go Tests (push) Failing after 1m32s
This commit is contained in:
@@ -85,7 +85,7 @@ func (d *WorkDay) GetTimes(u User, base WorktimeBase, includeKurzarbeit bool) (w
|
||||
|
||||
func getWorkPause(d *WorkDay) (work, pause time.Duration) {
|
||||
//if today calc, else take from db
|
||||
if helper.IsSameDate(d.Date(), time.Now()) {
|
||||
if d.workTime == 0 && d.pauseTime == 0 && len(d.Bookings) > 0 {
|
||||
return calcWorkPause(d.Bookings)
|
||||
} else {
|
||||
return d.workTime, d.pauseTime
|
||||
|
||||
Reference in New Issue
Block a user