feat: pre-existing local changes — fischerei, verband, modules, members, packages
Commits all remaining uncommitted local work: - apps/web: fischerei, verband, modules, members-cms, documents, newsletter, meetings, site-builder, courses, bookings, events, finance pages and components - apps/web: marketing page updates, layout, paths config, next.config.mjs, styles/makerkit.css - apps/web/i18n: documents, fischerei, marketing, verband (de+en) - packages/features: finance, fischerei, member-management, module-builder, newsletter, sitzungsprotokolle, verbandsverwaltung server APIs and components - packages/ui: button.tsx updates - pnpm-lock.yaml
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
BarChart3,
|
||||
TrendingUp,
|
||||
} from 'lucide-react';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
import { createMemberManagementApi } from '@kit/member-management/api';
|
||||
import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
||||
@@ -23,6 +24,7 @@ interface PageProps {
|
||||
export default async function MemberStatisticsPage({ params }: PageProps) {
|
||||
const { account } = await params;
|
||||
const client = getSupabaseServerClient();
|
||||
const t = await getTranslations('members');
|
||||
|
||||
const { data: acct } = await client
|
||||
.from('accounts')
|
||||
@@ -36,33 +38,33 @@ export default async function MemberStatisticsPage({ params }: PageProps) {
|
||||
const stats = await api.getMemberStatistics(acct.id);
|
||||
|
||||
const statusChartData = [
|
||||
{ name: 'Aktiv', value: stats.active ?? 0 },
|
||||
{ name: 'Inaktiv', value: stats.inactive ?? 0 },
|
||||
{ name: 'Ausstehend', value: stats.pending ?? 0 },
|
||||
{ name: 'Ausgetreten', value: stats.resigned ?? 0 },
|
||||
{ name: t('status.active'), value: stats.active ?? 0 },
|
||||
{ name: t('status.inactive'), value: stats.inactive ?? 0 },
|
||||
{ name: t('status.pending'), value: stats.pending ?? 0 },
|
||||
{ name: t('status.resigned'), value: stats.resigned ?? 0 },
|
||||
];
|
||||
|
||||
return (
|
||||
<CmsPageShell account={account} title="Mitglieder-Statistiken">
|
||||
<CmsPageShell account={account} title={t('statistics.title')}>
|
||||
<div className="flex w-full flex-col gap-6">
|
||||
<div className="grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4">
|
||||
<StatsCard
|
||||
title="Gesamt"
|
||||
title={t('statistics.totalMembers')}
|
||||
value={stats.total ?? 0}
|
||||
icon={<Users className="h-5 w-5" />}
|
||||
/>
|
||||
<StatsCard
|
||||
title="Aktiv"
|
||||
title={t('status.active')}
|
||||
value={stats.active ?? 0}
|
||||
icon={<UserCheck className="h-5 w-5" />}
|
||||
/>
|
||||
<StatsCard
|
||||
title="Inaktiv"
|
||||
title={t('status.inactive')}
|
||||
value={stats.inactive ?? 0}
|
||||
icon={<UserMinus className="h-5 w-5" />}
|
||||
/>
|
||||
<StatsCard
|
||||
title="Ausstehend"
|
||||
title={t('status.pending')}
|
||||
value={stats.pending ?? 0}
|
||||
icon={<Clock className="h-5 w-5" />}
|
||||
/>
|
||||
@@ -73,7 +75,7 @@ export default async function MemberStatisticsPage({ params }: PageProps) {
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2">
|
||||
<BarChart3 className="h-5 w-5" />
|
||||
Mitglieder nach Status
|
||||
{t('statistics.title')}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
@@ -85,7 +87,7 @@ export default async function MemberStatisticsPage({ params }: PageProps) {
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2">
|
||||
<TrendingUp className="h-5 w-5" />
|
||||
Verteilung
|
||||
{t('statistics.totalMembers')}
|
||||
</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
|
||||
Reference in New Issue
Block a user