feat(#162): Empfehlung-vs-Vote-Konsistenz im Antrag-Detail
Direkt unter "Abstimmungsergebnis" steht ein Hinweis-Block: - "Mehrheit kontra GWÖ-Empfehlung" (rot) wenn Empfehlung "unterstützen" und Beschluss "abgelehnt" oder umgekehrt. - "Mehrheit deckt sich mit GWÖ-Empfehlung" (grün) bei aligniertem Fall. - Bei "überwiesen" oder ambivalenter Empfehlung kein Block. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
db0c0681c6
commit
76f03e72ee
@ -275,6 +275,23 @@
|
||||
"bestätigt": "#2da44e",
|
||||
"sammel": "#0969da",
|
||||
} %}
|
||||
{# Konsistenz-Hinweis: GWÖ-Empfehlung vs. tatsächlicher Beschluss #}
|
||||
{% set verdict_text = (antrag.verdict_title or '') | lower %}
|
||||
{% set first_outcome = (antrag.plenum_votes[0].ergebnis or '') | lower %}
|
||||
{% set rec_supports = ('unterstützen' in verdict_text) or ('befürworten' in verdict_text) %}
|
||||
{% set rec_rejects = 'ablehnen' in verdict_text %}
|
||||
{% set out_passed = first_outcome in ['angenommen', 'bestätigt'] %}
|
||||
{% set out_failed = first_outcome == 'abgelehnt' %}
|
||||
{% set conflict = (rec_supports and out_failed) or (rec_rejects and out_passed) %}
|
||||
{% set aligned = (rec_supports and out_passed) or (rec_rejects and out_failed) %}
|
||||
{% if conflict or aligned %}
|
||||
<div style="margin-bottom:10px;padding:8px 12px;border-radius:6px;font-size:12px;line-height:1.5;
|
||||
background:{% if conflict %}color-mix(in srgb,#cf222e 8%,transparent){% else %}color-mix(in srgb,#2da44e 8%,transparent){% endif %};
|
||||
border-left:3px solid {% if conflict %}#cf222e{% else %}#2da44e{% endif %};">
|
||||
<strong>{% if conflict %}Mehrheit kontra GWÖ-Empfehlung{% else %}Mehrheit deckt sich mit GWÖ-Empfehlung{% endif %}</strong>
|
||||
— Empfohlen: <em>{{ antrag.verdict_title }}</em>; Beschluss: <em>{{ first_outcome | capitalize }}</em>.
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for v in antrag.plenum_votes %}
|
||||
<div style="border:1px solid var(--hairline);border-radius:6px;padding:12px 14px;margin-bottom:10px;background:var(--paper);">
|
||||
<div style="display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px;">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user