ux(v2): bessere Anzeige für 'skipped' Drucksachen (Kleine Anfragen etc.)
Vorher: Button-Text 'Übersprungen', der Grund nur als Tooltip — User versteht nicht warum. Jetzt: 'Nicht abstimmbar' + sichtbare Italic-Begruendung unter der Zeile mit dem konkreten Reason-Text vom Server (Backend liefert reason, typ und typ_normiert). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
997d59a9a5
commit
85a10b7fc3
@ -301,8 +301,18 @@ async function lsAnalyse(btn, drucksache, bundesland) {
|
||||
return;
|
||||
}
|
||||
if (data.status === 'skipped') {
|
||||
btn.textContent = 'Übersprungen';
|
||||
btn.title = 'Typ "' + (data.typ || 'unbekannt') + '" ist nicht abstimmbar';
|
||||
btn.textContent = 'Nicht abstimmbar';
|
||||
btn.title = (data.reason || ('Typ „' + (data.typ || 'unbekannt') + '" ist nicht abstimmbar — keine GWÖ-Bewertung sinnvoll'));
|
||||
btn.style.opacity = '0.55';
|
||||
btn.style.cursor = 'not-allowed';
|
||||
// Begründung sichtbar in der Zeile anzeigen
|
||||
var row = btn.closest('.ls-row');
|
||||
if (row) {
|
||||
var hint = document.createElement('div');
|
||||
hint.style.cssText = 'flex-basis:100%;font-family:var(--font-mono);font-size:11px;color:var(--ecg-dark);opacity:0.7;margin-top:4px;font-style:italic;';
|
||||
hint.textContent = data.reason || ('Typ „' + (data.typ || 'unbekannt') + '" — keine Abstimmung, keine GWÖ-Bewertung');
|
||||
row.appendChild(hint);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user