Documentation ¶
Index ¶
- func CalculateExpectedWorkTime(ctx context.Context, monthlyWorkDays []MonthlyWorkDays, ...) (map[string]ExpectedMonthlyWorkTimeList, error)
- func EndOfWeek(t time.Time) time.Time
- func StartOfWeek(t time.Time) time.Time
- type ExpectedMonthlyWorkTime
- type ExpectedMonthlyWorkTimeList
- type MonthlyWorkDays
- type PlannedMonthlyWorkTime
- type PlannedMonthlyWorkTimeList
- type UserTime
- type WorkTimeList
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateExpectedWorkTime ¶
func CalculateExpectedWorkTime( ctx context.Context, monthlyWorkDays []MonthlyWorkDays, workTimes map[string]WorkTimeList, from string, to string, ) (map[string]ExpectedMonthlyWorkTimeList, error)
Types ¶
type ExpectedMonthlyWorkTime ¶
type ExpectedMonthlyWorkTime struct { Year int Month time.Month TrackedWorkTime time.Duration UntrackedWorkTime time.Duration }
func (ExpectedMonthlyWorkTime) String ¶
func (mwt ExpectedMonthlyWorkTime) String() string
type ExpectedMonthlyWorkTimeList ¶
type ExpectedMonthlyWorkTimeList []ExpectedMonthlyWorkTime
func (ExpectedMonthlyWorkTimeList) TotalTrackedWorkTime ¶
func (emwtl ExpectedMonthlyWorkTimeList) TotalTrackedWorkTime() time.Duration
func (ExpectedMonthlyWorkTimeList) TotalWorkTime ¶
func (emwtl ExpectedMonthlyWorkTimeList) TotalWorkTime() time.Duration
type MonthlyWorkDays ¶
func GatherWorkDaysByMonth ¶
func GatherWorkDaysByMonth(holidays map[string]*calendarv1.PublicHoliday, from, to string) ([]MonthlyWorkDays, error)
func (MonthlyWorkDays) String ¶
func (mwd MonthlyWorkDays) String() string
type PlannedMonthlyWorkTime ¶
type PlannedMonthlyWorkTimeList ¶
type PlannedMonthlyWorkTimeList []*PlannedMonthlyWorkTime
func CalculatePlannedMonthlyWorkTime ¶
func CalculatePlannedMonthlyWorkTime( ctx context.Context, rosters []structs.DutyRoster, from string, to string, workShifts []structs.WorkShift, workTimes map[string]WorkTimeList, ) (PlannedMonthlyWorkTimeList, error)
func (PlannedMonthlyWorkTimeList) TotalForUser ¶
func (lst PlannedMonthlyWorkTimeList) TotalForUser(userId string) UserTime
type WorkTimeList ¶
func (WorkTimeList) FindForDate ¶
Click to show internal directories.
Click to hide internal directories.