diff options
author | Özgür Kesim <oec@kesim.org> | 2024-11-26 19:40:42 +0100 |
---|---|---|
committer | Özgür Kesim <oec@kesim.org> | 2024-11-26 19:40:42 +0100 |
commit | 2f0a7b14f57704bbf1e1277e93fc1d4935e34e57 (patch) | |
tree | 2a84edeede43ad545e940d5d6392b0f87fcc6a22 | |
parent | 866c44aa7ac7a82c70084179a036fb7b35c75f75 (diff) |
report adjustments
-rw-r--r-- | templates/report.t | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/templates/report.t b/templates/report.t index 48c849c..ce1e74c 100644 --- a/templates/report.t +++ b/templates/report.t @@ -6,24 +6,22 @@ Beneficiary: {{.Beneficiary}} {{ range $id, $wp := .Workpackages }} ## Workpackage {{ $id }}: {{ $wp.Title }} -{{ range $tid, $task := $wp.Tasks}} +{{ range $tid, $task := $wp.Tasks }} {{$task.ID}}: {{ $task.Title }} Budget: {{ $task.Budget.AsMonth }} {{ end }} {{ end }} -| Date | Days | WP's | +| Date | Time | WP's | |:-----------|---------:|:--------:| {{- range $d, $e := .Timeline }} -| {{ $d }} | {{ printf "%8s" $e.Total.AsDay }} | {{ printf "%8s" $e.WPs }} | +| {{ $d }} | {{ printf "%8s" $e.Total }} | {{ printf "%8s" $e.WPs }} | {{- end }} -{{- $tl := .Timeline }} +{{- $tl := .Timeline }}{{- $hd := .Holidays }} -{{/* }} # Days {{ range .Days }} -{{if .IsWeekend }}({{else}} {{end}}{{.Date}}{{ if .IsWeekend }}){{else}} {{end -}} -{{ with $e := index $tl .Date }} {{ printf "%8s" $e.Total.AsDay }} {{ printf "%8s" $e.WPs }} {{ end }} +{{if or .IsWeekend .IsHoliday }}# {{end}}{{.Date}}{{ if .IsHoliday}} ({{ index $hd .Date}}){{end -}} +{{ with .Planned }} Planned: {{ .Total }}{{ end }}{{ with .Worked }} Worked: {{ .Total }}{{end}} {{- end }} -{{ */}} |