widgets

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HelpWidget

type HelpWidget struct {
	w.Paragraph
}

HelpWidget is a component with the help text

func NewHelpWidget

func NewHelpWidget() *HelpWidget

NewHelpWidget creates new HelpWidget

type TimeEntriesWidget

type TimeEntriesWidget struct {
	*components.Table
	TimeEntries []types.TimeEntry
}

TimeEntriesWidget is a component with the time entries

func NewTimeEntriesWidget

func NewTimeEntriesWidget() *TimeEntriesWidget

NewTimeEntriesWidget creates new TimeEntriesWidget

func (*TimeEntriesWidget) GetSelectedTimeEntry

func (w *TimeEntriesWidget) GetSelectedTimeEntry() (types.TimeEntry, error)

GetSelectedTimeEntry returns the selected time entry

func (*TimeEntriesWidget) UpdateData

func (w *TimeEntriesWidget) UpdateData(timeEntries []types.TimeEntry, workplace Workplace)

UpdateData updates and reloads TimeEntriesWidget

type TimeEntryWidget

type TimeEntryWidget struct {
	*w.Table
	TimeEntry types.TimeEntry
}

TimeEntryWidget is a component with the single time entry data

func NewTimeEntryWidget

func NewTimeEntryWidget() *TimeEntryWidget

NewTimeEntryWidget creates new TimeEntryWidget

func (*TimeEntryWidget) SetTimeEntry

func (t *TimeEntryWidget) SetTimeEntry(timeEntry types.TimeEntry)

SetTimeEntry sets the value of TimeEntryWidget.TimeEntry

func (*TimeEntryWidget) UpdateTable

func (t *TimeEntryWidget) UpdateTable()

UpdateTable updates table with TimeEntryWidget.TimeEntry data

type UserWidget

type UserWidget struct {
	*w.Table
	User types.User
}

UserWidget is a component that displays the user data

func NewUserWidget

func NewUserWidget() *UserWidget

NewUserWidget creates new UserWidget

func (*UserWidget) SetUser

func (u *UserWidget) SetUser(user types.User)

SetUser sets the value of UserWidget.User

type Workplace

type Workplace struct {
	ID   string
	Name string
}

Workplace represents the workplace entity from the API

type WorkplacesWidget

type WorkplacesWidget struct {
	*components.Table
	Workplaces []Workplace
}

WorkplacesWidget is a component that displays workplaces

func NewWorkplacesWidget

func NewWorkplacesWidget() *WorkplacesWidget

NewWorkplacesWidget creates new WorkplacesWidget

func (*WorkplacesWidget) GetSelectedWorkplace

func (w *WorkplacesWidget) GetSelectedWorkplace() (Workplace, error)

GetSelectedWorkplace returns the selected workplace

func (*WorkplacesWidget) SetWorkplaces

func (w *WorkplacesWidget) SetWorkplaces(workplaces []Workplace)

SetWorkplaces sets the value of WorkplacesWidget.Workplaces

Jump to

Keyboard shortcuts

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