reworked pdf exporter to use typst
Some checks failed
Tests / Run Go Tests (push) Failing after 1m44s
Some checks failed
Tests / Run Go Tests (push) Failing after 1m44s
This commit is contained in:
@@ -83,11 +83,23 @@ func (d *WorkDay) Date() time.Time {
|
||||
return d.Day
|
||||
}
|
||||
|
||||
func (d *WorkDay) GenerateKurzArbeitBookings(u User) (time.Time, time.Time) {
|
||||
var timeFrom, timeTo time.Time
|
||||
if d.workTime >= u.ArbeitszeitProTag() {
|
||||
return timeFrom, timeTo
|
||||
}
|
||||
|
||||
timeFrom = d.Bookings[len(d.Bookings)-1].Timestamp.Add(time.Minute)
|
||||
timeTo = timeFrom.Add(u.ArbeitszeitProTag() - d.workTime)
|
||||
slog.Debug("Added duration as Kurzarbeit", "date", d.Date().String(), "duration", timeTo.Sub(timeFrom).String())
|
||||
|
||||
return timeFrom, timeTo
|
||||
}
|
||||
|
||||
func (d *WorkDay) TimeWorkVirtual(u User) time.Duration {
|
||||
if d.IsKurzArbeit() {
|
||||
return u.ArbeitszeitProTag()
|
||||
}
|
||||
|
||||
return d.workTime
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user