This commit is contained in:
@@ -85,6 +85,15 @@ func (u *User) GetAll() ([]User, error) {
|
||||
return users, nil
|
||||
}
|
||||
|
||||
// Returns the worktime per day rounded to minutes
|
||||
func (u *User) ArbeitszeitProTag() time.Duration {
|
||||
return time.Duration(u.ArbeitszeitPerTag * float32(time.Hour)).Round(time.Minute)
|
||||
}
|
||||
|
||||
func (u *User) ArbeitszeitProWoche() time.Duration {
|
||||
return time.Duration(u.ArbeitszeitPerWoche * float32(time.Hour)).Round(time.Minute)
|
||||
}
|
||||
|
||||
// Returns true if there is a booking 1 for today -> meaning the user is at work
|
||||
// Returns false if there is no booking today or the user is already booked out of the system
|
||||
func (u *User) CheckAnwesenheit() bool {
|
||||
|
||||
Reference in New Issue
Block a user