feat: router with RJSF workflows and access management UI
This commit is contained in:
parent
46ecab00db
commit
62d01b5097
15 changed files with 948 additions and 144 deletions
32
frontend/src/pages/AdminPage.tsx
Normal file
32
frontend/src/pages/AdminPage.tsx
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
import AdminTab from "../components/AdminTab";
|
||||
import ApprovalsTab from "../components/ApprovalsTab";
|
||||
import AccessQueue from "../components/AccessQueue";
|
||||
import { useAuth } from "../auth";
|
||||
|
||||
export default function AdminPage() {
|
||||
const { me } = useAuth();
|
||||
if (!me) {
|
||||
return (
|
||||
<div>
|
||||
<h2>Verwaltung</h2>
|
||||
<p>Bitte melden Sie sich an, um die Verwaltung zu nutzen.</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
if (me.role !== "admin") {
|
||||
return (
|
||||
<div>
|
||||
<h2>Verwaltung</h2>
|
||||
<p>Nur für Administratoren. Ihr Konto hat die Rolle „{me.role}“.</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
<h2>Verwaltung</h2>
|
||||
<AccessQueue />
|
||||
<ApprovalsTab />
|
||||
<AdminTab />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue