tried to add untertags krank
Some checks failed
Tests / Run Go Tests (push) Failing after 2m3s

This commit is contained in:
2025-12-05 15:03:34 +01:00
parent a6ea625e8f
commit f73c2b1a96
21 changed files with 508 additions and 653 deletions

View File

@@ -50,14 +50,14 @@ func (a *Absence) IsMultiDay() bool {
}
func (a *Absence) GetWorktimeReal(u User, base WorktimeBase) time.Duration {
if a.AbwesenheitTyp.WorkTime <= 1 {
if a.AbwesenheitTyp.WorkTime <= 0 {
return 0
}
switch base {
case WorktimeBaseDay:
return u.ArbeitszeitProTag()
return u.ArbeitszeitProTagFrac(float32(a.AbwesenheitTyp.WorkTime) / 100)
case WorktimeBaseWeek:
return u.ArbeitszeitProWoche() / 5
return u.ArbeitszeitProWocheFrac(0.2 * float32(a.AbwesenheitTyp.WorkTime) / 100)
}
return 0
}
@@ -66,7 +66,7 @@ func (a *Absence) GetPausetimeReal(u User, base WorktimeBase) time.Duration {
}
func (a *Absence) GetOvertimeReal(u User, base WorktimeBase) time.Duration {
if a.AbwesenheitTyp.WorkTime > 1 {
if a.AbwesenheitTyp.WorkTime > 0 {
return 0
}
switch base {