reportconfig

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2023 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseReportRequest added in v0.11.0

type BaseReportRequest struct {
	Year  int `param:"year" form:"year"`
	Month int `param:"month" form:"month"`
}

func (*BaseReportRequest) FromRequest added in v0.11.0

func (i *BaseReportRequest) FromRequest(e echo.Context) error

func (BaseReportRequest) GetDateRange added in v0.11.0

func (i BaseReportRequest) GetDateRange() (time.Time, time.Time)

GetDateRange returns the appropriate `begin` and `end` dates, taking into account yearly reports.

func (BaseReportRequest) GetFirstDayOfMonth added in v0.11.0

func (i BaseReportRequest) GetFirstDayOfMonth() time.Time

GetFirstDayOfMonth returns the first day of the ReportRequest.Month in time.UTC at midnight.

func (BaseReportRequest) GetFirstDayOfNextMonth added in v0.11.0

func (i BaseReportRequest) GetFirstDayOfNextMonth() time.Time

GetFirstDayOfNextMonth returns the first day returned by GetFirstDayOfMonth of the next month.

func (BaseReportRequest) GetFirstDayOfNextYear added in v0.11.0

func (i BaseReportRequest) GetFirstDayOfNextYear() time.Time

GetFirstDayOfNextYear returns the first day of the year after ReportRequest.Year in time.UTC at midnight.

func (BaseReportRequest) GetFirstDayOfYear added in v0.11.0

func (i BaseReportRequest) GetFirstDayOfYear() time.Time

GetFirstDayOfYear returns the first day of the ReportRequest.Year in time.UTC at midnight.

func (BaseReportRequest) GetLastDayFromPreviousMonth added in v0.11.0

func (i BaseReportRequest) GetLastDayFromPreviousMonth() time.Time

GetLastDayFromPreviousMonth returns GetFirstDayOfMonth subtracted by 1 day.

func (BaseReportRequest) GetLastDayFromPreviousYear added in v0.11.0

func (i BaseReportRequest) GetLastDayFromPreviousYear() time.Time

GetLastDayFromPreviousYear returns GetFirstDayOfYear subtracted by 1 day.

func (BaseReportRequest) GetLastDayOfMonth added in v0.11.0

func (i BaseReportRequest) GetLastDayOfMonth() time.Time

GetLastDayOfMonth returns the last day of the ReportRequest.Month in time.UTC at midnight.

type ConfigController

type ConfigController struct {
	controller.BaseController
	Input ReportRequest

	Employee    model.Employee
	Attendances model.AttendanceList
	StartOfWeek time.Time
	EndOfWeek   time.Time
	Leaves      odoo.List[model.Leave]
	Contracts   model.ContractList
	Report      timesheet.Report
	User        *model.User
	// contains filtered or unexported fields
}

func NewConfigController

func NewConfigController(ctrl *controller.BaseController) *ConfigController

func (*ConfigController) ProcessInput

func (c *ConfigController) ProcessInput() error

func (*ConfigController) ShowConfigurationFormAndWeeklyReport added in v1.0.0

func (c *ConfigController) ShowConfigurationFormAndWeeklyReport() error

type ConfigView

type ConfigView struct {
	controller.BaseView
	// contains filtered or unexported fields
}

func (*ConfigView) GetConfigurationValues

func (v *ConfigView) GetConfigurationValues(report timesheet.Report) controller.Values

type ReportRequest

type ReportRequest struct {
	BaseReportRequest
	SearchUser            string `form:"username"`
	SearchUserEnabled     bool
	EmployeeReportEnabled bool
	EmployeeID            int `param:"employee"`
}

ReportRequest contains all relevant input data for generating reports.

func (*ReportRequest) FromRequest

func (i *ReportRequest) FromRequest(e echo.Context) error

FromRequest parses the properties based on the given request echo.Context.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL