added feiertage to database + endpoint to insert every year
This commit is contained in:
@@ -23,11 +23,11 @@ type WorkDay struct {
|
||||
worktimeAbsece Absence
|
||||
}
|
||||
|
||||
type WorktimeBase string
|
||||
type WorktimeBase int
|
||||
|
||||
const (
|
||||
WorktimeBaseWeek WorktimeBase = "week"
|
||||
WorktimeBaseDay WorktimeBase = "day"
|
||||
WorktimeBaseWeek WorktimeBase = 5
|
||||
WorktimeBaseDay WorktimeBase = 1
|
||||
)
|
||||
|
||||
func (d *WorkDay) GetWorktimeAbsence() Absence {
|
||||
@@ -126,6 +126,10 @@ func (d *WorkDay) Date() time.Time {
|
||||
return d.Day
|
||||
}
|
||||
|
||||
func (d *WorkDay) Type() DayType {
|
||||
return DayTypeWorkday
|
||||
}
|
||||
|
||||
func (d *WorkDay) GenerateKurzArbeitBookings(u User) (time.Time, time.Time) {
|
||||
var timeFrom, timeTo time.Time
|
||||
if d.GetWorktime(u, WorktimeBaseDay, false) >= u.ArbeitszeitProTag() {
|
||||
|
||||
Reference in New Issue
Block a user