Documentation ¶
Index ¶
- func ConvertCSV(path string, verbose bool) *excelize.File
- func Departments() []string
- func FilterColumns(cols []int, read *pe.Read) map[int][]interface{}
- func Open(path string) *pe.Read
- type Department
- type TimetrackingFile
- type WorkloadFile
- func (wf *WorkloadFile) AddEmployee(name string, department Department)
- func (wf *WorkloadFile) AddValueToEmployee(employee string, value float64, sheetname, column string)
- func (wf *WorkloadFile) DeclareNewColumnForPeriod(period string, sheetname string) string
- func (wf *WorkloadFile) DeclareNewColumnWithNextPeriod(sheetname string) string
- func (wf *WorkloadFile) ModifiableSheetnames() []string
- func (wf *WorkloadFile) RemoveLastPeriod(sheetname string, rowExeptions []int)
- func (wf *WorkloadFile) Save(path string)
- func (wf *WorkloadFile) Sheetnames() []string
- func (wf *WorkloadFile) UpdateFormulas(sheetname string, belowRow int) map[string]string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertCSV ¶
ConvertCSV converts a csv file to an excel file
func Departments ¶
func Departments() []string
Departments returns a list of all avaiable departments
func FilterColumns ¶
FilterColumns extracts cols and returns a map with values per col
Types ¶
type Department ¶
type Department string
Department describes the departments employees are categorised in
const ( // ManagingDirectors Department ManagingDirectors Department = "Geschäftsführung" // Consulting Department Consulting Department = "Beratung" //Creation Department Creation Department = "Kreative" //Production Department Production Department = "Produktion" //Text Department Text Department = "Text" //Administration Department Administration Department = "Verwaltung" //Training Department Training Department = "Auszubildende/Trainee" //PR Department PR Department = "PR" )
type TimetrackingFile ¶
type TimetrackingFile struct {
// contains filtered or unexported fields
}
TimetrackingFile wraps the time tracking excel file from proad in a struct
func ReadProadExcel ¶
func ReadProadExcel(path string) *TimetrackingFile
ReadProadExcel opens a proad export, that has been saved as excel
func (*TimetrackingFile) GetColumns ¶
func (ttf *TimetrackingFile) GetColumns(columns []int) map[int][]string
GetColumns returns a map with columns as key and cellValues as value array
type WorkloadFile ¶
type WorkloadFile struct {
// contains filtered or unexported fields
}
WorkloadFile represents a workload file
func OpenWorkloadFile ¶
func OpenWorkloadFile(path string) *WorkloadFile
OpenWorkloadFile opens and returns a workloadfile
func (*WorkloadFile) AddEmployee ¶
func (wf *WorkloadFile) AddEmployee(name string, department Department)
AddEmployee adds a new Employee alphabetically and in the provided department
func (*WorkloadFile) AddValueToEmployee ¶
func (wf *WorkloadFile) AddValueToEmployee(employee string, value float64, sheetname, column string)
AddValueToEmployee adds a value to employee in the last used column of sheet
func (*WorkloadFile) DeclareNewColumnForPeriod ¶
func (wf *WorkloadFile) DeclareNewColumnForPeriod(period string, sheetname string) string
DeclareNewColumnForPeriod adds a new period into the next free column of sheetname
func (*WorkloadFile) DeclareNewColumnWithNextPeriod ¶
func (wf *WorkloadFile) DeclareNewColumnWithNextPeriod(sheetname string) string
DeclareNewColumnWithNextPeriod adds a new column to sheetname with a week more based on the last week
func (*WorkloadFile) ModifiableSheetnames ¶
func (wf *WorkloadFile) ModifiableSheetnames() []string
ModifiableSheetnames returns all sheetnames, that need to be modified
func (*WorkloadFile) RemoveLastPeriod ¶
func (wf *WorkloadFile) RemoveLastPeriod(sheetname string, rowExeptions []int)
RemoveLastPeriod removes the values of the most recent added column
func (*WorkloadFile) Save ¶
func (wf *WorkloadFile) Save(path string)
Save saves the workloadfile to path
func (*WorkloadFile) Sheetnames ¶
func (wf *WorkloadFile) Sheetnames() []string
Sheetnames returns all sheetnames of the workloadfile
func (*WorkloadFile) UpdateFormulas ¶
func (wf *WorkloadFile) UpdateFormulas(sheetname string, belowRow int) map[string]string
UpdateFormulas corrects formulas, that became incorrect by inserting a row