using IWorkDay interface for team
All checks were successful
Tests / Run Go Tests (push) Successful in 42s

This commit is contained in:
2025-09-25 21:52:53 +02:00
parent db6fc10c28
commit e8f1113293
7 changed files with 141 additions and 83 deletions

View File

@@ -87,6 +87,13 @@ func (a *Absence) RequiresAction() bool {
return false
}
func (a *Absence) GetAllWorkTimesVirtual(u User) (work, pause, overtime time.Duration) {
if a.AbwesenheitTyp.WorkTime > 1 {
return u.ArbeitszeitProTag(), 0, 0
}
return 0, 0, 0
}
func (a *Absence) Insert() error {
qStr, err := DB.Prepare(`INSERT INTO abwesenheit (card_uid, abwesenheit_typ, datum_from, datum_to) VALUES ($1, $2, $3, $4) RETURNING counter_id;`)
if err != nil {