summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÖzgür Kesim <oec@kesim.org>2024-12-01 18:04:30 +0100
committerÖzgür Kesim <oec@kesim.org>2024-12-01 18:04:30 +0100
commit6c29a7a61bc01e02d4b17491608ba65c2a303d30 (patch)
treebb86c1f4bb25bb61c4b583e77eac8f4fd600c1c2
parentd5997c53855cee043788d43e18efca746d0ad1bd (diff)
range status added
-rw-r--r--templates/status.md42
1 files changed, 42 insertions, 0 deletions
diff --git a/templates/status.md b/templates/status.md
new file mode 100644
index 0000000..375058f
--- /dev/null
+++ b/templates/status.md
@@ -0,0 +1,42 @@
+Project: {{.Name}}
+Grant: {{.Grant}}
+Start: {{.Start}}
+End: {{.End}}
+Beneficiary: {{.Beneficiary}}
+{{- $p := . }}
+{{- $start := ParseDate "2023-12-01" }}
+{{- $end := ParseDate "2024-11-30" }}
+{{- $totals := .Totals $start $end }}
+
+# Status, as of {{.Today}}
+
+```
+ Planned : {{ printf "%8s" $totals.Planned }}{{with $totals.Unaccounted}}
+ ! Open !: {{ printf "%8s" . }}{{end}}
+ Done : {{ printf "%8s" $totals.Done }}{{ with $totals.Open }}
+ ! Todo !: {{ printf "%8s" . }}
+Time left: {{ printf "%8s" ($p.AsDaysAmount (len $p.DaysRemaining)) }} * {{len $p.Users}}{{end}}
+```
+
+## Overview of WP Status
+{{range $wp, $t := $totals.WP }}
+Total for {{ $wp }}:
+ - Budgeted: {{ printf "%8s" $t.Budgeted.AsDay }}
+ - Planned: {{ printf "%8s" $t.Planned.AsDay }}{{with $t.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}}
+ - Actual: {{ printf "%8s" $t.Done.AsDay }} ({{ printf "%5.2f%%" $t.Percent }}){{with $t.Open }} !Todo!: {{printf "%8s" .AsDay }}{{end}}
+ - Per Task:
+ {{- range $n, $t := $t.Tasks }}
+ - {{ $n }}:{{ $tt := $p.TotalWPTask $wp $n $start $end }}
+ - Budgeted: {{ printf "%8s" $tt.Budgeted.AsDay }}
+ - Planned: {{ printf "%8s" $tt.Planned.AsDay }}{{with $tt.Unaccounted }} !Unaccounted: {{printf "%8s" .AsDay}}{{end}}
+ - Actual: {{ printf "%8s" $tt.Done.AsDay }} ({{ printf "%5.2f%%" $t.Percent }}){{with $tt.Open }} !Todo!: {{printf "%8s" .AsDay}}{{end}}
+ {{ end }}
+{{ end }}
+
+## Overview of WP Status
+
+```
+{{- range .ParallelWPTotals }}
+{{.}}
+{{- end}}
+```