added Gleitzeit + Kurzarbeit closes #23
All checks were successful
Tests / Run Go Tests (push) Successful in 33s

This commit is contained in:
2025-09-13 14:12:39 +02:00
parent ccded6d76b
commit 2d0b117403
18 changed files with 298 additions and 255 deletions

View File

@@ -198,17 +198,6 @@ func (u *User) IsTeamLeader() bool {
return len(team) > 0
}
func (u *User) GetWeek(tsFrom time.Time) WorkWeek {
var bookings []WorkDay
weekStart := tsFrom.AddDate(0, 0, -1*int(tsFrom.Local().Weekday())-1)
bookings, err := (*Booking).GetBookingsGrouped(nil, u.CardUID, weekStart, time.Now())
if err != nil {
log.Println("Error fetching bookings!")
return WorkWeek{WorkDays: bookings}
}
return WorkWeek{WorkDays: bookings}
}
// gets the first week, that needs to be submitted
func (u *User) GetNextWeek() WorkWeek {
var week WorkWeek