minor fixes in pdf generator + new booking input select
This commit is contained in:
@@ -51,7 +51,11 @@ func convertDayToTypstDayParts(day models.IWorkDay, user models.User) []typstDay
|
||||
for i := 0; i < len(workDay.Bookings); i += 2 {
|
||||
var typstDayPart typstDayPart
|
||||
typstDayPart.BookingFrom = workDay.Bookings[i].Timestamp.Format("15:04")
|
||||
typstDayPart.BookingTo = workDay.Bookings[i+1].Timestamp.Format("15:04")
|
||||
if i+1 < len(workDay.Bookings) {
|
||||
typstDayPart.BookingTo = workDay.Bookings[i+1].Timestamp.Format("15:04")
|
||||
} else {
|
||||
typstDayPart.BookingTo = workDay.Bookings[i].Timestamp.Format("15:04")
|
||||
}
|
||||
typstDayPart.WorkType = workDay.Bookings[i].BookingType.Name
|
||||
typstDayPart.IsWorkDay = true
|
||||
typstDayParts = append(typstDayParts, typstDayPart)
|
||||
|
||||
Reference in New Issue
Block a user