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,40 @@
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { createVerbandApi } from '@kit/verbandsverwaltung/api';
import {
VerbandTabNavigation,
SharedTemplates,
} 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 TemplatesPage({ 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 templates = await api.listSharedTemplates(acct.id);
return (
<CmsPageShell
account={account}
title="Verbandsverwaltung - Vorlagen"
description="Geteilte Vorlagen aus der Verbandshierarchie klonen und verwenden"
>
<VerbandTabNavigation account={account} activeTab="templates" />
<SharedTemplates accountId={acct.id} templates={templates} />
</CmsPageShell>
);
}