From ad2f8698f76068feada4f99ec92a490ac8ca054c Mon Sep 17 00:00:00 2001 From: beantownbabe <156287695+beantownbabe@users.noreply.github.com> Date: Mon, 26 Oct 2026 18:06:47 +0100 Subject: [PATCH] =?UTF-8?q?Drop=20"TXproducts=20=E2=80=94"=20prefix=20from?= =?UTF-8?q?=20CTA=20Campaign=20phase=20headers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Header is now just the date range and lead theme (e.g. "Nov 3 - Nov 26 (Failure Analysis)"), no company-name prefix — the Campaign dropdown above it already names both the campaign and the company. --- app.py | 12 ++++++++++-- report.py | 5 +++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/app.py b/app.py index c150b89..fdc1b76 100644 --- a/app.py +++ b/app.py @@ -4542,9 +4542,17 @@ def _render_reports_tab(month_value): _is_campaign_month = report.CAMPAIGN_START <= _month_start <= report.CAMPAIGN_END except ValueError: pass + if _is_campaign_month: + _title_text = f"{stats['period_label']} End of Month Campaign Report" + elif month_value in report.CUSTOM_PERIODS: + # Just the date range and its lead theme, e.g. "Nov 3 - Nov 26 (Failure + # Analysis)" — no "TXproducts —" prefix, the Campaign dropdown above it + # already names the campaign and the company. + _title_text = stats["period_label"] + else: + _title_text = f"TXproducts — {stats['period_label']}" title_heading = html.H3( - f"{stats['period_label']} End of Month Campaign Report" if _is_campaign_month - else f"TXproducts — {stats['period_label']}", + _title_text, style={"color": "#1b3a5c", "marginBottom": "0", "fontWeight": "700", "fontSize": "2rem", "whiteSpace": "nowrap"}) diff --git a/report.py b/report.py index c428332..3b7c00c 100644 --- a/report.py +++ b/report.py @@ -289,6 +289,11 @@ def build_report_docx(ctx, timeframe_value="all"): title_text = "TXproducts — 3-Month Campaign Report (July-September 2026)" elif monthly_notes and is_campaign_month: title_text = f"{period_label} End of Month Campaign Report" + elif timeframe_value in CUSTOM_PERIODS: + # Just the date range and its lead theme, e.g. "Nov 3 - Nov 26 (Failure + # Analysis)" — no "TXproducts —" prefix, the Campaign dropdown above it + # already names the campaign and the company. + title_text = period_label elif monthly_notes: title_text = f"TXproducts — {period_label}" else: