fixed: pause time calculation from work instead of presence time
All checks were successful
Tests / Run Go Tests (push) Successful in 1m44s
All checks were successful
Tests / Run Go Tests (push) Successful in 1m44s
This commit is contained in:
@@ -116,7 +116,8 @@ func correctWorkPause(workIn, pauseIn time.Duration) (work, pause time.Duration)
|
||||
}
|
||||
|
||||
var diff time.Duration
|
||||
if workIn <= (9*time.Hour) && pauseIn < 30*time.Minute {
|
||||
|
||||
if (workIn+pauseIn) <= (9*time.Hour+30*time.Minute) && pauseIn <= 30*time.Minute {
|
||||
diff = 30*time.Minute - pauseIn
|
||||
} else if pauseIn < 45*time.Minute {
|
||||
diff = 45*time.Minute - pauseIn
|
||||
|
||||
Reference in New Issue
Block a user