/time now also uses workDay instead of grouped booking --> outsourcing

to sql
This commit is contained in:
2025-03-28 13:05:26 +01:00
parent eb45a3ef75
commit 5a696788ed
10 changed files with 225 additions and 178 deletions

View File

@@ -136,7 +136,7 @@ func (b *Booking) GetBookingsGrouped(card_uid string, tsFrom time.Time, tsTo tim
return bookings[i].Timestamp.Before(bookings[j].Timestamp)
})
workDay := WorkDay{Day: day, Bookings: bookings}
workDay.GetWorkTime()
workDay.getWorkTime()
result = append(result, workDay)
}
@@ -162,10 +162,14 @@ func (b Booking) Save() {
func (b *Booking) GetBookingType() string {
switch b.CheckInOut {
case 1, 3: //manuelle Änderung
case 1: //manuelle Änderung
return "kommen"
case 2, 4: //manuelle Änderung
case 3:
return "kommen manuell"
case 2: //manuelle Änderung
return "gehen"
case 4:
return "gehen manuell"
case 255:
return "abgemeldet"
default: