Skip to content

Commit

Permalink
Merge pull request #137 from vshn/tz-in-all-report
Browse files Browse the repository at this point in the history
Display timezone in all-employee-report
  • Loading branch information
ccremer authored Nov 18, 2022
2 parents 9866d56 + fdacdff commit d75c3a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/web/employeereport/employeereport_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (v *reportView) getValuesForReport(report timesheet.Report, previousPayslip
"ReportDirectLink": fmt.Sprintf("/report/%d/%d/%02d", report.Employee.ID, v.year, v.month),
"ButtonText": v.getButtonText(nextPayslip),
"Workload": v.FormatFloat(report.Summary.AverageWorkload*100, 0),
"Timezone": report.From.Location(),
"Leaves": report.Summary.TotalLeave,
"ExcusedHours": v.FormatDurationInHours(report.Summary.TotalExcusedTime),
"WorkedHours": v.FormatDurationInHours(report.Summary.TotalWorkedTime),
Expand Down
2 changes: 1 addition & 1 deletion templates/employeereport.html
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ <h1>Attendances for {{ .Month }} {{ .Year }}</h1>
<tbody>
{{ range .Reports }}
<tr>
<td><a href="{{ .ReportDirectLink }}">{{ .Name }}</a> ({{ .Workload }}%)</td>
<td><a href="{{ .ReportDirectLink }}">{{ .Name }}</a><br>Workload: {{ .Workload }}%<br>Location: {{ .Timezone }}</td>
<td>{{ .Leaves }}d</td>
<td>{{ .ExcusedHours }}</td>
<td>{{ .WorkedHours }}</td>
Expand Down

0 comments on commit d75c3a5

Please sign in to comment.