fix: Negativ-Zeile im Review-Modal immer zeigen (fehlt sichtbar machen)

question/word-Pairs zeigen die Negativ-Zeile jetzt auch wenn leer ('fehlt'
statt stilles Ausblenden), damit eine fehlende Negativ-Antwort auffaellt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-05 22:14:28 +02:00
parent 840996fce9
commit 2a6d203d1c

View File

@@ -42,7 +42,7 @@ function buildRows(content) {
} else if (type === 'word') {
rows.push({ kind: 'lang', label: 'Positiv-Wörter', color: 'text-green-700',
cell: wordsCell(content.positive) });
if (content.negative?.words?.length)
// 'word' braucht laut Datenmodell Negativ-Wörter → Zeile immer zeigen, fehlende sichtbar machen
rows.push({ kind: 'lang', label: 'Negativ-Wörter', color: 'text-red-600',
cell: wordsCell(content.negative) });
} else {
@@ -50,9 +50,10 @@ function buildRows(content) {
if (content.positive)
rows.push({ kind: 'lang', label: 'Positiv', color: 'text-green-700',
cell: sentenceCell(content.positive, 'positive_sentence') });
const negHasContent = content.negative &&
LANGS.some(l => (content.negative.sentence?.[`negative_sentence_${l}`] || '').trim());
if (negHasContent)
// 'question' = Frage + Positiv + Negativ → Negativ-Zeile immer zeigen, auch wenn leer
// ('fehlt' statt stilles Ausblenden, damit eine fehlende Negativ-Antwort auffällt).
// 'text' hat per Definition kein Negativ.
if (type === 'question')
rows.push({ kind: 'lang', label: 'Negativ', color: 'text-red-600',
cell: sentenceCell(content.negative, 'negative_sentence') });
}