feat(org-detail): Org-Status als prominenter Umschalter in der Kopfzeile

Statt des kleinen Auswahlfelds neben dem Namen jetzt ein deutlich
sichtbarer Zwei-Knopf-Umschalter (Aktiv grün mit Haken, Deaktiviert rot
mit Sperr-Symbol), der aktive Zustand ist farbig gefüllt, Klick
speichert sofort wie bisher.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Dieser Commit ist enthalten in:
claude-dev
2026-07-25 15:49:38 +00:00
Ursprung f301e22c6b
Commit db0a8c1d9e
3 geänderte Dateien mit 45 neuen und 8 gelöschten Zeilen

Datei anzeigen

@@ -314,12 +314,17 @@ function renderOrgHeader(org) {
document.getElementById("orgDetailHeader").innerHTML = `
<div style="display:flex; align-items:flex-start; gap:10px; flex-wrap:wrap;">
<div style="flex:1; min-width:260px;">
<h2 style="display:flex; align-items:center; gap:10px; flex-wrap:wrap;">${esc(org.name)}
<select onchange="setOrgActive(this.value)" title="Status der Organisation, speichert sofort"
style="width:auto; font-size:13px; padding:4px 8px;">
<option value="true"${org.is_active ? " selected" : ""}>Aktiv</option>
<option value="false"${org.is_active ? "" : " selected"}>Deaktiviert</option>
</select>
<h2 style="display:flex; align-items:center; gap:14px; flex-wrap:wrap;">${esc(org.name)}
<div class="org-status-toggle" role="group" aria-label="Status der Organisation, Klick speichert sofort">
<button type="button" class="ost-btn ost-aktiv${org.is_active ? " on" : ""}" onclick="setOrgActive('true')" title="Organisation aktivieren">
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>
Aktiv
</button>
<button type="button" class="ost-btn ost-inaktiv${org.is_active ? "" : " on"}" onclick="setOrgActive('false')" title="Organisation deaktivieren">
<svg xmlns="http://www.w3.org/2000/svg" width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="4.93" y1="4.93" x2="19.07" y2="19.07"/></svg>
Deaktiviert
</button>
</div>
</h2>
<div class="text-secondary mt-8">Slug: ${esc(org.slug)} | Nutzer: ${org.user_count} | Lizenz: ${org.license_type || "Keine"} | Kontingent: <span id="orgKpiCredits">${esc(kpiText)}</span></div>
</div>