Analyse: Sperre im WOMS kenntlich machen

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Sonnet 5.5 committed 2026-10-01 10:40:06 +00:00
1 parent 0cec45d3da
commit 8ecf07fecd
3 files changed
+7 -2

No files matched your search

+2 -1
View File
@@ -50,8 +50,9 @@ export default function AnalyseRow({ projectId }) {
) : (
<span className="text-grey">Lädt …</span>
)}
{status.hint && <span className="text-grey">({status.hint})</span>}
{status.canEnable && !mode && (
<button type="button" className="btn btn-sm" onClick={() => setMode('on')}>Einschalten</button>
<button type="button" className="btn btn-sm" onClick={() => setMode('on')}>{status.enableLabel || 'Einschalten'}</button>
)}
{status.canDisable && !mode && (
<button type="button" className="btn btn-sm" onClick={() => setMode('off')}>Ausschalten</button>
+1 -1
View File
@@ -23,7 +23,7 @@ export function analyseStatus(a) {
const at = formatBerlinDate(a.activatedAt)
return { text: at ? `An seit ${at}` : 'An', color: 'green', canEnable: false, canDisable: true }
}
if (a.state === 'disabled') return { text: 'Gesperrt', color: 'red', canEnable: Boolean(a.eligible), canDisable: false }
if (a.state === 'disabled') return { text: 'Gesperrt', hint: 'Vom Team gesperrt', enableLabel: 'Trotz Sperre einschalten', color: 'red', canEnable: Boolean(a.eligible), canDisable: false }
if (!a.eligible) {
return { text: `Nicht verfügbar${a.reasonText ? `: ${a.reasonText}` : ''}`, color: 'grey', canEnable: false, canDisable: false }
}