@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user