summaryrefslogtreecommitdiff
path: root/templates/report.t
blob: 08f4f436ab4b01cf7d7f361155d65724dd4973d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Project:     {{.Name}}
Grant:       {{.Grant}}
Start:       {{.Start}}
End:         {{.End}}
Beneficiary: {{.Beneficiary}}


{{ range $wp, $t := .Totals }}
Total for {{ $wp }}:
  - Budgeted:	{{ printf "%8s" $t.Budgeted.AsDay }}
  - Planned:	{{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} Unaccounted: {{.AsDay}}{{end}}
  - Actual:		{{ printf "%8s" $t.Actual.AsDay }}
{{ end }}

{{ range $id, $wp := .Workpackages -}}
## Workpackage {{ $id }}: {{ $wp.Title }}
{{ range $tid, $task := $wp.Tasks }}
    {{$task.ID}}: {{ $task.Title }}
        Budget:    {{ $task.Budget.AsMonth }}
{{ end }}

{{ end }}

|  Date      |   Time   |   WP's   |
|:-----------|---------:|:--------:|
{{- range $d, $e := .Timeline }}
| {{ $d }} | {{ printf "%8s" $e.Total }} | {{ printf "%8s" $e.WPs }} |
{{- end }}
{{- $tl := .Timeline }}{{- $hd := .Holidays }}

# Days
{{ range .Days 2024 03 }}
{{if or .IsWeekend .IsHoliday }}# {{end}}{{.Date}}{{ if .IsHoliday}} ({{ index $hd .Date}}){{end -}}
{{ with .Planned }}	Planned: {{ .Total }}{{ end }}{{ with .Worked }}	Worked: {{ .Total }}{{end}}
{{- end }}