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