package templates import ( "arbeitszeitmessung/helper" "arbeitszeitmessung/models" "fmt" "strconv" "time" ) templ weekPicker(weekStart time.Time) { {{ year, kw := weekStart.ISOWeek() }}
} templ defaultWeekDayComponent(u models.User, day models.IWorkDay) {{ day.Date().Format("02.01.2006") }
{{ work, pause, _ := day.GetTimes(u, models.WorktimeBaseDay, false) }}Keine Anwesenheit
}Bitte anpassen
} } templ workWeekComponent(week models.WorkWeek, onlyAccept bool) { {{ year, kw := week.WeekStart.ISOWeek() progress := (float32(week.WorktimeVirtual.Hours()) / week.User.ArbeitszeitPerWoche) * 100 }}{ week.User.Vorname } { week.User.Name }
Arbeitszeit: { fmt.Sprintf("%s", helper.FormatDuration(week.Worktime)) }
Überstunden: { fmt.Sprintf("%s", helper.FormatDurationFill(week.Overtime, true)) }
Woche: { fmt.Sprintf("%02d-%d", kw, year) }
} else {{ user.Vorname } { user.Name }