package templates import ( "arbeitszeitmessung/models" "strconv" "time" ) templ changeButtonComponent(id string, workDay bool) { } templ newAbsenceComponent() { } templ absenceComponent(a *models.Absence, isKurzarbeit bool) { {{ editBox := "" if isKurzarbeit { editBox = "edit-box" } }}
@absentInput(a)

{ a.ToString() } if a.IsMultiDay() { bis { a.DateTo.Format("02.01.2006") } }

if isKurzarbeit { }
} templ absentInput(a *models.Absence) { } //js function to select the right entry templ newBookingComponent(d models.IWorkDay) { } templ bookingComponent(booking models.Booking) {

{ booking.Timestamp.Format("15:04") } { booking.GetBookingType() }

if booking.IsSubmittedAndChecked() {

submitted

}
} templ workdayComponent(workDay *models.WorkDay) { if len(workDay.Bookings) < 1 {

Keine Buchung gefunden. Bitte Arbeitsstunden oder Grund der Abwesenheit eingeben!

} else { if workDay.IsKurzArbeit() && len(workDay.Bookings) > 0 { @absenceComponent(workDay.GetKurzArbeit(), true) } for _, booking := range workDay.Bookings { @bookingComponent(booking) } 0 && workDay.Bookings[len(workDay.Bookings)-1].CheckInOut%2 == 0 }/> } } templ holidayComponent(d models.IWorkDay) {

{ d.ToString() }

}