reportconfig

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigController

type ConfigController struct {
	controller.BaseController
	Input ReportRequest

	Employee *model.Employee
	// contains filtered or unexported fields
}

func NewConfigController

func NewConfigController(ctx *controller.BaseController) *ConfigController

func (*ConfigController) ProcessInput

func (c *ConfigController) ProcessInput() error

func (*ConfigController) ShowConfigurationForm

func (c *ConfigController) ShowConfigurationForm() error

type ConfigView

type ConfigView struct {
	// contains filtered or unexported fields
}

func (*ConfigView) GetConfigurationValues

func (v *ConfigView) GetConfigurationValues() controller.Values

type ReportRequest

type ReportRequest struct {
	Year                  int    `param:"year" form:"year"`
	Month                 int    `param:"month" form:"month"`
	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.

func (ReportRequest) GetDateRange added in v0.10.1

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

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

func (ReportRequest) GetFirstDayOfMonth

func (i ReportRequest) GetFirstDayOfMonth() time.Time

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

func (ReportRequest) GetFirstDayOfNextMonth

func (i ReportRequest) GetFirstDayOfNextMonth() time.Time

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

func (ReportRequest) GetFirstDayOfNextYear added in v0.10.1

func (i ReportRequest) GetFirstDayOfNextYear() time.Time

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

func (ReportRequest) GetFirstDayOfYear added in v0.10.1

func (i ReportRequest) GetFirstDayOfYear() time.Time

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

func (ReportRequest) GetLastDayFromPreviousMonth

func (i ReportRequest) GetLastDayFromPreviousMonth() time.Time

GetLastDayFromPreviousMonth returns GetFirstDayOfMonth subtracted by 1 day.

func (ReportRequest) GetLastDayFromPreviousYear added in v0.10.1

func (i ReportRequest) GetLastDayFromPreviousYear() time.Time

GetLastDayFromPreviousYear returns GetFirstDayOfYear subtracted by 1 day.

func (ReportRequest) GetLastDayOfMonth

func (i ReportRequest) GetLastDayOfMonth() time.Time

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

Jump to

Keyboard shortcuts

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