feat: updated docs and added description to files
This commit is contained in:
@@ -1,5 +1,10 @@
|
||||
package endpoints
|
||||
|
||||
// this served as "/auto/kurzarbeit" will add a booking to every kurzarbeitstag
|
||||
// to make them reach the full lenght of workday.
|
||||
//
|
||||
// right now this is not in use because the time is calculated
|
||||
|
||||
import (
|
||||
"arbeitszeitmessung/helper"
|
||||
"arbeitszeitmessung/helper/paramParser"
|
||||
@@ -58,8 +63,8 @@ func fillKurzarbeit(r *http.Request, w http.ResponseWriter) {
|
||||
workday, _ := day.(*models.WorkDay)
|
||||
|
||||
lastBookingTime := workday.Bookings[len(workday.Bookings)-1].Timestamp
|
||||
kurzarbeitBegin := (*models.Booking).New(nil, user.CardUID, 0, 1, bookingTypeKurzarbeit.Id)
|
||||
kurzarbeitEnd := (*models.Booking).New(nil, user.CardUID, 0, 2, bookingTypeKurzarbeit.Id)
|
||||
kurzarbeitBegin := (*models.Booking).NewBooking(nil, user.CardUID, 0, 1, bookingTypeKurzarbeit.Id)
|
||||
kurzarbeitEnd := (*models.Booking).NewBooking(nil, user.CardUID, 0, 2, bookingTypeKurzarbeit.Id)
|
||||
kurzarbeitBegin.Timestamp = lastBookingTime.Add(time.Minute)
|
||||
kurzarbeitEnd.Timestamp = lastBookingTime.Add(worktimeKurzarbeit)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user