diff --git a/docs/shift-report.md b/docs/shift-report.md index c5099b9..a7990da 100644 --- a/docs/shift-report.md +++ b/docs/shift-report.md @@ -277,8 +277,9 @@ Speed always uses the approximate FA windows. The shift report's production table uses these same FA windows and KPI results for each listed order. Its speed describes the FA's estimated period; material -uses the configured segment or order-aware source rule. The shift-wide speed and -material sections remain useful reconciliation totals. In HTML, the FA number +uses the configured segment or order-aware source rule. The shift-wide material +section remains available as a reconciliation total; the shift-wide speed +summary stays in the report model but is not rendered. In HTML, the FA number links directly to `/order?production_order=...` for the order's full shift list. The PDF prints the FA number as text. diff --git a/src/production_analytics/presentation/shift_report.py b/src/production_analytics/presentation/shift_report.py index 6ecd51f..eadb5a0 100644 --- a/src/production_analytics/presentation/shift_report.py +++ b/src/production_analytics/presentation/shift_report.py @@ -201,17 +201,6 @@ def present_report( story.append( MaterialPieBlock(labels, tuple(quantity for _, _, quantity in positive_materials)) ) - text("Liniengeschwindigkeit", "Heading2") - if report.speed is None: - text("Für diese Maschine nicht verfügbar.") - else: - speed = report.speed.average_line_speed_m_min - text( - "Durchschnittliche Liniengeschwindigkeit im Lauf: " - + (f"{_number(speed)} m/min" if speed is not None - else "Nicht verfügbar (keine Laufdaten).") - ) - return tuple(story) diff --git a/tests/test_shift_report.py b/tests/test_shift_report.py index 9fa417c..b1027c9 100644 --- a/tests/test_shift_report.py +++ b/tests/test_shift_report.py @@ -260,7 +260,7 @@ def test_partial_capabilities_skip_disabled_sources_and_render_unavailable( blocks = present_report(report) unavailable = [b for b in blocks if isinstance(b, TextBlock) and b.text == "Für diese Maschine nicht verfügbar."] - assert len(unavailable) == (2 if downtime else 3) + assert len(unavailable) == (1 if downtime else 2) def test_downtime_only_machine_does_not_query_production(): diff --git a/tests/test_shift_report_html.py b/tests/test_shift_report_html.py index ec50e82..01d8ff5 100644 --- a/tests/test_shift_report_html.py +++ b/tests/test_shift_report_html.py @@ -44,6 +44,8 @@ def test_production_rows_show_attributed_kpis_and_link_fa_to_detail(): assert '