feat(orgs): Pipeline-Sprache als Org-Setting im Verwaltungsportal
- OrgCreate / OrgUpdate / OrgResponse um output_language (de | en). - routers/organizations.py persistiert die Sprache nach create/update via shared.services.org_settings.set_org_setting. - _enrich_org liest output_language aus organization_settings (Default de). - Frontend: Dropdown im Modal Neue Organisation und im Org-Edit-Formular, Auto-Befuellung aus org.output_language. Cache-Buster auf app.js gebumpt. Phase 7 von 8 (eng_demo / Org-Sprache).
Dieser Commit ist enthalten in:
@@ -25,6 +25,15 @@ async def _enrich_org(db: aiosqlite.Connection, row: aiosqlite.Row) -> dict:
|
||||
lic = await cursor.fetchone()
|
||||
org["license_status"] = lic["status"] if lic else "none"
|
||||
org["license_type"] = lic["license_type"] if lic else ""
|
||||
|
||||
# output_language aus organization_settings (Default 'de')
|
||||
cursor = await db.execute(
|
||||
"SELECT value FROM organization_settings WHERE organization_id = ? AND key = 'output_language'",
|
||||
(org["id"],),
|
||||
)
|
||||
lang_row = await cursor.fetchone()
|
||||
org["output_language"] = lang_row["value"] if lang_row else "de"
|
||||
|
||||
return org
|
||||
|
||||
|
||||
@@ -57,6 +66,10 @@ async def create_organization(
|
||||
org_id = cursor.lastrowid
|
||||
await db.commit()
|
||||
|
||||
# output_language als organization_settings-Eintrag persistieren
|
||||
from shared.services.org_settings import set_org_setting
|
||||
await set_org_setting(db, org_id, "output_language", data.output_language)
|
||||
|
||||
cursor = await db.execute("SELECT * FROM organizations WHERE id = ?", (org_id,))
|
||||
new_row_obj = await cursor.fetchone()
|
||||
await log_action(
|
||||
@@ -105,6 +118,11 @@ async def update_organization(
|
||||
await db.execute(f"UPDATE organizations SET {set_clause} WHERE id = ?", values)
|
||||
await db.commit()
|
||||
|
||||
# output_language separat ueber organization_settings setzen
|
||||
if data.output_language is not None:
|
||||
from shared.services.org_settings import set_org_setting
|
||||
await set_org_setting(db, org_id, "output_language", data.output_language)
|
||||
|
||||
after = await row_to_dict(db, "organizations", org_id)
|
||||
await log_action(
|
||||
db, admin, get_client_ip(request),
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren