using IWorkDay interface for team
All checks were successful
Tests / Run Go Tests (push) Successful in 42s

This commit is contained in:
2025-09-25 21:52:53 +02:00
parent db6fc10c28
commit e8f1113293
7 changed files with 141 additions and 83 deletions

View File

@@ -29,7 +29,7 @@ func PDFHandler(w http.ResponseWriter, r *http.Request) {
//TODO: only accepted weeks
weeks := models.GetWorkDays(user, startDate, endDate)
weeks := models.GetDays(user, startDate, endDate, false)
// log.Printf("Using Dates: %s - %s\n", startDate.String(), endDate.String())
templates.PDFReportEmploye(user, weeks, startDate, endDate).Render(r.Context(), w)

View File

@@ -66,7 +66,7 @@ func getBookings(w http.ResponseWriter, r *http.Request) {
}
tsTo = tsTo.AddDate(0, 0, 1) // so that today is inside
days := models.GetDays(user, tsFrom, tsTo)
days := models.GetDays(user, tsFrom, tsTo, true)
sort.Slice(days, func(i, j int) bool {
return days[i].Date().After(days[j].Date())
})