added userLogout fixes #15, #10

This commit is contained in:
2025-05-01 19:42:33 +02:00
parent 35ec575a05
commit 9a88397bb2
11 changed files with 151 additions and 89 deletions

View File

@@ -184,7 +184,7 @@ func (d *WorkDay) RequiresAction() bool {
// returns a integer percentage of how much day has been worked of
func (d *WorkDay) GetWorkDayProgress(user User) uint8 {
defaultWorkTime := time.Duration(user.Arbeitszeit * float32(time.Hour))
defaultWorkTime := time.Duration(user.ArbeitszeitPerTag * float32(time.Hour))
progress := (d.workTime.Seconds() / defaultWorkTime.Seconds()) * 100
return uint8(progress)
}