From 68c9afd9390e48e6a099ae59802b02ce742dd84a Mon Sep 17 00:00:00 2001 From: Konrad du Plessis Date: Wed, 22 Apr 2026 23:43:14 +0200 Subject: [PATCH] Report: Chapter I (lifetime context) + chapter numbering Replaces the old narrow four-card All-Time/YTD row (dropped in Task 9) with two wider cards under a numbered 'Chapter I - Lifetime Context' heading. Projects card gains Start, Working Days, Total Cost, and Avg R / Working Day columns per the design. Teams card keeps name + total. Adds .chapter-heading and .chapter-num CSS for the orange numbered markers (I, II, III, IV) and .report-numeric class that applies tabular-nums across the number columns of every report table. Renames the existing 'Selected Period' heading to Chapter II. Co-Authored-By: Claude Opus 4.7 (1M context) --- core/templates/core/report.html | 65 +++++++++++++++++++++++++++++++-- static/css/custom.css | 35 ++++++++++++++++++ 2 files changed, 97 insertions(+), 3 deletions(-) diff --git a/core/templates/core/report.html b/core/templates/core/report.html index 04fd31d..6760f97 100644 --- a/core/templates/core/report.html +++ b/core/templates/core/report.html @@ -90,15 +90,74 @@ +{# === CHAPTER I — Lifetime Context === #} +
ILifetime Context
+
+
+
+
+
All Time — Projects
+
+
+ {% if alltime_projects %} +
+ + + + + + + + + + + + {% for item in alltime_projects %} + + + + + + + + {% endfor %} + +
ProjectStartWorking DaysTotal CostAvg R / Working Day
{{ item.project }}{% if item.start_date %}{{ item.start_date|date:"d M Y" }}{% else %}{% endif %}{{ item.working_days|default:"—" }}R {{ item.total|money }}{% if item.working_days %}R {{ item.avg_per_working_day|money }}{% else %}{% endif %}
+
+ {% else %}

No lifetime project data.

{% endif %} +
+
+
+
+
+
+
All Time — Teams
+
+
+ {% if alltime_teams %} +
+ + + + {% for item in alltime_teams %} + + {% endfor %} + +
TeamTotal Cost
{{ item.team }}R {{ item.total|money }}
+
+ {% else %}

No lifetime team data.

{% endif %} +
+
+
+
+ -
- Selected Period: {{ start_date|date:"d M Y" }} — {{ end_date|date:"d M Y" }} -
+
IISelected Period: {{ start_date|date:"d M Y" }} – {{ end_date|date:"d M Y" }}
diff --git a/static/css/custom.css b/static/css/custom.css index e1501f0..93cfcc6 100644 --- a/static/css/custom.css +++ b/static/css/custom.css @@ -1686,3 +1686,38 @@ body, .card, .modal-content, .form-control, .form-select, color: var(--text-tertiary); margin-top: 0.6rem; } + +/* === Report chapter headings === */ +/* + Numbered chapter markers (I, II, III, IV) on the executive report. + Each heading has an orange filled circle with the Roman numeral + followed by the chapter title. Used on Chapter I (Lifetime Context), + II (Selected Period), III (Worker Breakdown), IV (Team x Project). +*/ +.chapter-heading { + display: flex; + align-items: center; + gap: 0.75rem; + color: var(--text-primary); + font-family: 'Poppins', sans-serif; + font-weight: 600; +} +.chapter-heading .chapter-num { + display: inline-flex; + align-items: center; + justify-content: center; + width: 1.85rem; + height: 1.85rem; + border-radius: 50%; + background: var(--accent); + color: #fff; + font-size: 0.85rem; + font-weight: 700; + font-family: 'Inter', sans-serif; +} + +/* tabular-nums for all numeric report tables */ +.report-numeric td, +.report-numeric th { + font-variant-numeric: tabular-nums; +}