added worktime base to work time calculations
Some checks failed
Tests / Run Go Tests (push) Failing after 1m4s
Some checks failed
Tests / Run Go Tests (push) Failing after 1m4s
This commit is contained in:
@@ -20,7 +20,7 @@ func convertDaysToTypst(days []models.IWorkDay, u models.User) ([]typstDay, erro
|
||||
var typstDays []typstDay
|
||||
for _, day := range days {
|
||||
var thisTypstDay typstDay
|
||||
work, pause, overtime := day.GetAllWorkTimesVirtual(u)
|
||||
work, pause, overtime := day.GetTimesVirtual(u, models.WorktimeBaseWeek)
|
||||
thisTypstDay.Date = day.Date().Format(DE_DATE)
|
||||
thisTypstDay.Worktime = helper.FormatDurationFill(work, true)
|
||||
thisTypstDay.Pausetime = helper.FormatDurationFill(pause, true)
|
||||
@@ -129,6 +129,8 @@ func createEmployeReport(employee models.User, startDate, endDate time.Time) (by
|
||||
targetHours := (employee.ArbeitszeitProWoche() / 5) * time.Duration(helper.GetWorkingDays(startDate, endDate))
|
||||
workingDays := models.GetDays(employee, startDate, endDate, false)
|
||||
|
||||
slog.Debug("Baseline Working hours", "targetHours", targetHours.Hours())
|
||||
|
||||
var actualHours time.Duration
|
||||
for _, day := range workingDays {
|
||||
actualHours += day.TimeWorkVirtual(employee)
|
||||
|
||||
Reference in New Issue
Block a user