reportconfig

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 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) 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 last day of the ReportRequest.Month in time.UTC.

func (ReportRequest) GetLastDayFromPreviousMonth

func (i ReportRequest) GetLastDayFromPreviousMonth() time.Time

GetLastDayFromPreviousMonth returns GetFirstDayOfMonth 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