feat: add cross-organization member search and template cloning functionality

This commit is contained in:
T. Zehetbauer
2026-04-01 10:15:35 +02:00
parent d3db316a68
commit fd8c2cc32a
36 changed files with 9025 additions and 94 deletions

View File

@@ -0,0 +1,44 @@
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { createVerbandApi } from '@kit/verbandsverwaltung/api';
import {
VerbandTabNavigation,
HierarchyReport,
} from '@kit/verbandsverwaltung/components';
import { AccountNotFound } from '~/components/account-not-found';
import { CmsPageShell } from '~/components/cms-page-shell';
interface PageProps {
params: Promise<{ account: string }>;
}
export default async function ReportingPage({ params }: PageProps) {
const { account } = await params;
const client = getSupabaseServerClient();
const { data: acct } = await client
.from('accounts')
.select('id')
.eq('slug', account)
.single();
if (!acct) return <AccountNotFound />;
const api = createVerbandApi(client);
const [summary, report] = await Promise.all([
api.getHierarchySummary(acct.id),
api.getHierarchyReport(acct.id),
]);
return (
<CmsPageShell
account={account}
title="Verbandsverwaltung - Berichte"
description="Aggregierte Berichte und Kennzahlen aller Organisationen im Verband"
>
<VerbandTabNavigation account={account} activeTab="reporting" />
<HierarchyReport summary={summary} report={report} />
</CmsPageShell>
);
}