feat(260929-dzu): Einstellungen > Eigene Module fuer jeden Benutzer, Verwaltung nur gemeinsam

- gemeinsame Oberflaeche (CustomModuleManager, Formular, Loeschdialog) fuer Verwaltung und Einstellungen
- Einstellungen: persoenliche Eintraege, Verwaltung sendet shared: true und zeigt nur gemeinsame
- Navigation, Texte de/en, Komponententests

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-29 10:17:22 +02:00
parent bc4c0119de
commit ee97b4ed9f
11 changed files with 636 additions and 222 deletions
+11 -1
View File
@@ -13,6 +13,8 @@ export interface CustomModule {
name: string;
url: string;
category: string;
/** `true` = persoenlicher Eintrag des angemeldeten Benutzers, `false` = gemeinsam (vom Administrator). */
personal: boolean;
createdAt: string;
updatedAt: string;
}
@@ -23,6 +25,14 @@ export interface CustomModuleInput {
category: string;
}
/**
* Beim Anlegen: `shared: true` legt einen gemeinsamen Eintrag fuer alle an
* (nur Administratoren, sonst 403); ohne das Feld ist der Eintrag persoenlich.
*/
export interface CustomModuleCreateInput extends CustomModuleInput {
shared?: boolean;
}
/** Fehler mit HTTP-Status und Servermeldung (falls vorhanden). */
export class CustomModuleRequestError extends Error {
constructor(
@@ -83,7 +93,7 @@ export async function getCustomModule(id: string): Promise<CustomModule | null>
return res.json();
}
export async function createCustomModule(input: CustomModuleInput): Promise<CustomModule> {
export async function createCustomModule(input: CustomModuleCreateInput): Promise<CustomModule> {
const res = await fetch(`${API_URL}/custom-modules`, {
method: 'POST',
credentials: 'include',