+
+
+
Zugriffsverwaltung
+
+ Feature-Instanzen, Benutzer und Rollen an einem Ort verwalten
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {selectedMandateId && (
+
+
+
+
+ )}
+
+
+
+
+
+
+
+
+
Mandanten verwalten
+
+
+
+ {viewMode === 'hierarchy' ? (
+
+ ) : !selectedMandateId ? (
+
+
+
Kein Mandant ausgewählt
+
+ Wählen Sie einen Mandanten, um dessen Feature-Instanzen und Zugriffe zu verwalten.
+
+
+ ) : (
+ <>
+
+
+
+
+
+ {loading || statsLoading ? '…' : overviewStats.instances}
+
+ Instanzen
+
+
+
+
+
+
+ {loading || statsLoading ? '…' : overviewStats.users}
+
+ Benutzer
+
+
+
+
+
+
+ {loading || statsLoading ? '…' : overviewStats.roles}
+
+ Rollen (max)
+
+
+ {relationshipData && relationshipData.instances.length > 0 && (
+
+
+
+
Beziehungen
+
+
{relationshipData.mandateName}
+
+ {relationshipData.instances.slice(0, 5).map((inst) => (
+
+ {inst.label} ({inst.userCount})
+
+ ))}
+ {relationshipData.instances.length > 5 && (
+
+ +{relationshipData.instances.length - 5} weitere
+
+ )}
+
+
+
+
+ )}
+
+
+
+ Feature-Instanzen
+ {loading && filteredInstances.length === 0 ? (
+
+ ) : filteredInstances.length === 0 ? (
+
+
+
Keine Feature-Instanzen
+
+ Erstellen Sie eine neue Instanz oder wählen Sie ein anderes Feature.
+
+
+
+ ) : (
+
+ {filteredInstances.map((inst) => (
+
+
+ {inst.label}
+
+ {inst.enabled ? 'Aktiv' : 'Inaktiv'}
+
+
+
+ {getFeatureLabel(features.find((f) => f.code === inst.featureCode) || { code: inst.featureCode, label: inst.featureCode })}
+ {inst.userCount ?? '—'} Benutzer
+ {inst.roleCount ?? '—'} Rollen
+
+
+
+
+
+
+ ))}
+
+ )}
+
+ >
+ )}
+
+ {detailInstance && (
+
+ )}
+
+ {showWizard && (
+
setShowWizard(false)}
+ onComplete={handleWizardComplete}
+ />
+ )}
+
+ );
+};
+
+export default AccessManagementHub;
diff --git a/src/pages/admin/AdminMandateRolesPage.tsx b/src/pages/admin/AdminMandateRolesPage.tsx
index 22b7fba..a6fc149 100644
--- a/src/pages/admin/AdminMandateRolesPage.tsx
+++ b/src/pages/admin/AdminMandateRolesPage.tsx
@@ -14,16 +14,18 @@
*/
import React, { useState, useEffect, useMemo, useCallback, useRef } from 'react';
+import { useNavigate } from 'react-router-dom';
import { useMandateRoles, type Role, type RoleCreate, type RoleUpdate, type PaginationParams } from '../../hooks/useMandateRoles';
import { useUserMandates, type Mandate } from '../../hooks/useUserMandates';
import { FormGeneratorTable } from '../../components/FormGenerator/FormGeneratorTable';
import { FormGeneratorForm, type AttributeDefinition } from '../../components/FormGenerator/FormGeneratorForm';
-import { FaPlus, FaSync, FaUserShield, FaBuilding, FaGlobe } from 'react-icons/fa';
+import { FaPlus, FaSync, FaUserShield, FaBuilding, FaGlobe, FaShieldAlt, FaCube } from 'react-icons/fa';
import { useToast } from '../../contexts/ToastContext';
import api from '../../api';
import styles from './Admin.module.css';
export const AdminMandateRolesPage: React.FC = () => {
+ const navigate = useNavigate();
const { showError, showWarning } = useToast();
const {
roles,
@@ -310,6 +312,22 @@ export const AdminMandateRolesPage: React.FC = () => {