package templates
import "arbeitszeitmessung/models"
import "arbeitszeitmessung/helper"
templ Base() {
@workWeekComponent(userWeek, false)
//
//
//
Eigene Abrechnung
//
//
//
// @weekPicker(userWeek.WeekStart)
//
//
{ fmt.Sprintf("%s %s", userWeek.User.Vorname, userWeek.User.Name) }
//
//
//
// @statusCheckMark(userWeek.CheckStatus(), models.WeekStatusSent)
// Gesendet
//
//
// @statusCheckMark(userWeek.CheckStatus(), models.WeekStatusAccepted)
// Akzeptiert
//
//
//
// @timeGaugeComponent(int8(progress), false)
//
//
Arbeitszeit: { fmt.Sprintf("%s", helper.FormatDuration(userWeek.Worktime)) }
//
Überstunden: { fmt.Sprintf("%s", helper.FormatDurationFill(userWeek.Overtime, true)) }
//
//
//
//
//
// for _, day := range userWeek.Days {
// @defaultWeekDayComponent(userWeek.User, day)
// }
//
//
//
// @weekPicker(userWeek.WeekStart)
//
//
//
//
if len(weeks) > 0 {
Abrechnung Mitarbeiter
}
for _, week := range weeks {
@workWeekComponent(week, true)
}
}
templ TeamPresencePage(teamPresence map[models.User]bool) {
@Base()
@headerComponent()
Mitarbeiter
for user, present := range teamPresence {
@timeGaugeComponent(helper.BoolToInt8(present)*100-1, false)
{ user.Vorname } { user.Name }
if present {
Anwesend
} else {
Abwesend
}
}
//
//
Nicht Anwesend
//
// for _, user := range teamPresence[false] {
// @userPresenceComponent(user, false)
// }
//
//
}
templ LogoutButton() {