feat(approvals): UI für Freigaben — Review-Queue mit Approve/Reject (Modul 1/16)

Backend:
- Phantom-Permission-Bug gefixt: approvals:read/write/approve fehlten in
  CORE_PERMISSIONS (Rollen konnten sie nie zugewiesen bekommen — gleiche
  Fehlerklasse wie dashboard:read in M2)

Frontend:
- api/approvals.ts: TanStack Hooks (list/detail/approve/reject/expire/create)
- pages/Approvals.tsx: Review-Queue — Status-Tabs (Offen/Alle/Genehmigt/
  Abgelehnt/Abgelaufen), Karten mit Aktion/Entity/Requester/Metadata,
  Approve/Reject mit Kommentar-Modal, Permission-Gating (approvals:approve)
- Route /approvals (PermissionRoute approvals:read), Sidebar-Eintrag
- i18n approvals.* + nav.approvals (de/en)

Verifikation: Vitest 10/10 (Rendering, Tabs, Approve/Reject-Flow,
Kommentar, Permission-Gating, Resolved-Zustände), RBAC-Regression 102/102,
tsc clean, Build OK
This commit is contained in:
Agent Zero
2026-09-08 23:26:56 +02:00
parent 4eb05d96ad
commit ecc7a24c1c
8 changed files with 708 additions and 3 deletions
+28 -1
View File
@@ -21,7 +21,8 @@
"reports": "Reports",
"tasks": "Aufgaben",
"wiki": "Wiki",
"systemDashboard": "System Dashboard"
"systemDashboard": "System Dashboard",
"approvals": "Freigaben"
},
"auth": {
"login": "Anmelden",
@@ -1604,5 +1605,31 @@
"noValues": "Keine Werte verfügbar",
"loadError": "Werte konnten nicht geladen werden"
}
},
"approvals": {
"title": "Freigaben",
"statusPending": "Offen",
"statusAll": "Alle",
"statusApproved": "Genehmigt",
"statusRejected": "Abgelehnt",
"statusExpired": "Abgelaufen",
"status_Pending": "Offen",
"status_Approved": "Genehmigt",
"status_Rejected": "Abgelehnt",
"status_Expired": "Abgelaufen",
"approve": "Genehmigen",
"reject": "Ablehnen",
"approveWithTitle": "Anfrage genehmigen",
"rejectWithTitle": "Anfrage ablehnen",
"commentOptional": "Kommentar (optional)",
"comment": "Kommentar",
"entity": "Entität",
"created": "Erstellt",
"resolved": "Entschieden",
"expires": "Läuft ab",
"empty": "Keine Freigaben in dieser Ansicht.",
"requesterUser": "Benutzer",
"requesterAgent": "Agent",
"requesterSystem": "System"
}
}
+28 -1
View File
@@ -21,7 +21,8 @@
"reports": "Reports",
"tasks": "Tasks",
"wiki": "Wiki",
"systemDashboard": "System Dashboard"
"systemDashboard": "System Dashboard",
"approvals": "Approvals"
},
"auth": {
"login": "Sign In",
@@ -1604,5 +1605,31 @@
"noValues": "No values available",
"loadError": "Failed to load values"
}
},
"approvals": {
"title": "Approvals",
"statusPending": "Pending",
"statusAll": "All",
"statusApproved": "Approved",
"statusRejected": "Rejected",
"statusExpired": "Expired",
"status_Pending": "Pending",
"status_Approved": "Approved",
"status_Rejected": "Rejected",
"status_Expired": "Expired",
"approve": "Approve",
"reject": "Reject",
"approveWithTitle": "Approve request",
"rejectWithTitle": "Reject request",
"commentOptional": "Comment (optional)",
"comment": "Comment",
"entity": "Entity",
"created": "Created",
"resolved": "Resolved",
"expires": "Expires",
"empty": "No approvals in this view.",
"requesterUser": "User",
"requesterAgent": "Agent",
"requesterSystem": "System"
}
}