working compound days + working public holidays
Some checks failed
Tests / Run Go Tests (push) Failing after 44s

This commit is contained in:
2025-12-24 01:38:16 +01:00
parent 3439fff841
commit 855cd6f34f
20 changed files with 1180 additions and 616 deletions

View File

@@ -22,6 +22,11 @@ type Absence struct {
DateTo time.Time
}
// IsEmpty implements [IWorkDay].
func (a *Absence) IsEmpty() bool {
return false
}
func NewAbsence(card_uid string, abwesenheit_typ int, datum time.Time) (Absence, error) {
if abwesenheit_typ < 0 {
return Absence{
@@ -95,7 +100,7 @@ func (a *Absence) GetTimes(u User, base WorktimeBase, includeKurzarbeit bool) (w
}
func (a *Absence) ToString() string {
return "Abwesenheit"
return a.AbwesenheitTyp.Name
}
func (a *Absence) IsWorkDay() bool {
@@ -107,7 +112,7 @@ func (a *Absence) IsKurzArbeit() bool {
}
func (a *Absence) GetDayProgress(u User) int8 {
return 100
return a.AbwesenheitTyp.WorkTime
}
func (a *Absence) RequiresAction() bool {