feat: pre-existing local changes — fischerei, verband, modules, members, packages
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 6m20s
Workflow / ⚫️ Test (push) Has been skipped

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:
Zaid Marzguioui
2026-04-02 01:19:54 +02:00
parent a1719671df
commit b26e5aaafa
153 changed files with 2329 additions and 1227 deletions

View File

@@ -2,9 +2,12 @@
import React from 'react';
import type { SupabaseClient } from '@supabase/supabase-js';
import { createDocumentGeneratorApi } from '@kit/document-generator/api';
import { formatDate } from '@kit/shared/dates';
import { getLogger } from '@kit/shared/logger';
import type { Database } from '@kit/supabase/database';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
export type GenerateDocumentInput = {
@@ -86,7 +89,7 @@ function fmtDate(d: string | null): string {
// Member Card PDF — premium design with color accent bar, structured layout
// ═══════════════════════════════════════════════════════════════════════════
async function generateMemberCards(
client: ReturnType<typeof getSupabaseServerClient>,
client: SupabaseClient<Database>,
accountId: string,
accountName: string,
input: GenerateDocumentInput,
@@ -413,7 +416,7 @@ async function generateMemberCards(
// Address Labels (HTML — Avery L7163)
// ═══════════════════════════════════════════════════════════════════════════
async function generateLabels(
client: ReturnType<typeof getSupabaseServerClient>,
client: SupabaseClient<Database>,
accountId: string,
input: GenerateDocumentInput,
): Promise<GenerateDocumentResult> {
@@ -461,7 +464,7 @@ async function generateLabels(
// Member Report (Excel)
// ═══════════════════════════════════════════════════════════════════════════
async function generateMemberReport(
client: ReturnType<typeof getSupabaseServerClient>,
client: SupabaseClient<Database>,
accountId: string,
input: GenerateDocumentInput,
): Promise<GenerateDocumentResult> {

View File

@@ -1,6 +1,7 @@
import Link from 'next/link';
import { ArrowLeft } from 'lucide-react';
import { getTranslations } from 'next-intl/server';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { Button } from '@kit/ui/button';
@@ -23,15 +24,6 @@ interface PageProps {
searchParams: Promise<{ type?: string }>;
}
const DOCUMENT_LABELS: Record<string, string> = {
'member-card': 'Mitgliedsausweis',
invoice: 'Rechnung',
labels: 'Etiketten',
report: 'Bericht',
letter: 'Brief',
certificate: 'Zertifikat',
};
export default async function GenerateDocumentPage({
params,
searchParams,
@@ -39,6 +31,7 @@ export default async function GenerateDocumentPage({
const { account } = await params;
const { type } = await searchParams;
const client = getSupabaseServerClient();
const t = await getTranslations('documents');
const { data: acct } = await client
.from('accounts')
@@ -49,10 +42,13 @@ export default async function GenerateDocumentPage({
if (!acct) return <AccountNotFound />;
const selectedType = type ?? 'member-card';
const selectedLabel = DOCUMENT_LABELS[selectedType] ?? 'Dokument';
// Resolve the label from translations; fall back to generic 'Document'
const selectedLabel =
(t.raw(`types.${selectedType}`) as string | undefined) ??
t('generate.document');
return (
<CmsPageShell account={account} title="Dokument generieren">
<CmsPageShell account={account} title={t('generate.title')}>
<div className="flex w-full flex-col gap-6">
{/* Back link */}
<div>
@@ -61,16 +57,16 @@ export default async function GenerateDocumentPage({
className="text-muted-foreground hover:text-foreground inline-flex items-center text-sm"
>
<ArrowLeft className="mr-1 h-4 w-4" />
Zurück zu Dokumente
{t('generate.backToDocuments')}
</Link>
</div>
<Card className="max-w-2xl">
<CardHeader>
<CardTitle>{selectedLabel} generieren</CardTitle>
<CardDescription>
Wählen Sie den Dokumenttyp und die gewünschten Optionen.
</CardDescription>
<CardTitle>
{t('generate.generateLabel', { label: selectedLabel })}
</CardTitle>
<CardDescription>{t('generate.chooseOptions')}</CardDescription>
</CardHeader>
<CardContent>
@@ -82,7 +78,7 @@ export default async function GenerateDocumentPage({
<CardFooter>
<Link href={`/home/${account}/documents`}>
<Button variant="outline">Abbrechen</Button>
<Button variant="outline">{t('generate.cancel')}</Button>
</Link>
</CardFooter>
</Card>

View File

@@ -8,6 +8,7 @@ import {
Mail,
Award,
} from 'lucide-react';
import { getTranslations } from 'next-intl/server';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { Button } from '@kit/ui/button';
@@ -23,45 +24,31 @@ interface PageProps {
const DOCUMENT_TYPES = [
{
id: 'member-card',
title: 'Mitgliedsausweis',
description:
'Mitgliedsausweise mit Foto, Name und Mitgliedsnummer generieren.',
icon: CreditCard,
color: 'text-blue-600 bg-blue-50',
},
{
id: 'invoice',
title: 'Rechnung',
description:
'Professionelle Rechnungen im PDF-Format mit Logo und Positionen.',
icon: FileText,
color: 'text-green-600 bg-green-50',
},
{
id: 'labels',
title: 'Etiketten',
description: 'Adressetiketten für Serienbriefe im Avery-Format drucken.',
icon: Tag,
color: 'text-orange-600 bg-orange-50',
},
{
id: 'report',
title: 'Bericht',
description: 'Statistische Auswertungen und Berichte als PDF oder Excel.',
icon: BarChart3,
color: 'text-purple-600 bg-purple-50',
},
{
id: 'letter',
title: 'Brief',
description: 'Serienbriefe mit personalisierten Platzhaltern erstellen.',
icon: Mail,
color: 'text-rose-600 bg-rose-50',
},
{
id: 'certificate',
title: 'Zertifikat',
description: 'Teilnahmebescheinigungen und Zertifikate mit Unterschrift.',
icon: Award,
color: 'text-amber-600 bg-amber-50',
},
@@ -70,6 +57,7 @@ const DOCUMENT_TYPES = [
export default async function DocumentsPage({ params }: PageProps) {
const { account } = await params;
const client = getSupabaseServerClient();
const t = await getTranslations('documents');
const { data: acct } = await client
.from('accounts')
@@ -82,14 +70,14 @@ export default async function DocumentsPage({ params }: PageProps) {
return (
<CmsPageShell
account={account}
title="Dokumente"
description="Dokumente erstellen und verwalten"
title={t('overview.title')}
description={t('overview.subtitle')}
>
<div className="flex w-full flex-col gap-6">
{/* Actions */}
<div className="flex items-center justify-end">
<Link href={`/home/${account}/documents/templates`}>
<Button variant="outline">Vorlagen verwalten</Button>
<Button variant="outline">{t('overview.manageTemplates')}</Button>
</Link>
</div>
@@ -104,18 +92,20 @@ export default async function DocumentsPage({ params }: PageProps) {
<Icon className="h-6 w-6" />
</div>
<div className="flex-1">
<CardTitle className="text-base">{docType.title}</CardTitle>
<CardTitle className="text-base">
{t(`types.${docType.id}`)}
</CardTitle>
</div>
</CardHeader>
<CardContent className="flex flex-1 flex-col justify-between gap-4">
<p className="text-muted-foreground text-sm">
{docType.description}
{t(`typeDescriptions.${docType.id}`)}
</p>
<Link
href={`/home/${account}/documents/generate?type=${docType.id}`}
>
<Button variant="outline" size="sm" className="w-full">
Erstellen
{t('overview.generate')}
</Button>
</Link>
</CardContent>

View File

@@ -1,6 +1,7 @@
import Link from 'next/link';
import { FileText, Plus } from 'lucide-react';
import { getTranslations } from 'next-intl/server';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { Button } from '@kit/ui/button';
@@ -17,6 +18,7 @@ interface PageProps {
export default async function DocumentTemplatesPage({ params }: PageProps) {
const { account } = await params;
const client = getSupabaseServerClient();
const t = await getTranslations('documents');
const { data: acct } = await client
.from('accounts')
@@ -35,20 +37,17 @@ export default async function DocumentTemplatesPage({ params }: PageProps) {
}> = [];
return (
<CmsPageShell account={account} title="Dokumentvorlagen">
<CmsPageShell account={account} title={t('templates.title')}>
<div className="flex w-full flex-col gap-6">
{/* Header */}
<div className="flex items-center justify-between">
<div>
<h1 className="text-2xl font-bold">Dokumentvorlagen</h1>
<p className="text-muted-foreground">
Vorlagen für Mitgliedsausweise, Rechnungen, Etiketten und mehr
</p>
<p className="text-muted-foreground">{t('templates.subtitle')}</p>
</div>
<Button data-test="document-templates-new-btn">
<Plus className="mr-2 h-4 w-4" />
Neue Vorlage
{t('templates.newTemplate')}
</Button>
</div>
@@ -56,24 +55,30 @@ export default async function DocumentTemplatesPage({ params }: PageProps) {
{templates.length === 0 ? (
<EmptyState
icon={<FileText className="h-8 w-8" />}
title="Keine Vorlagen vorhanden"
description="Erstellen Sie Ihre erste Dokumentvorlage, um Mitgliedsausweise, Rechnungen und mehr zu generieren."
actionLabel="Neue Vorlage"
title={t('templates.noTemplates')}
description={t('templates.createFirstLong')}
actionLabel={t('templates.newTemplate')}
/>
) : (
<Card>
<CardHeader>
<CardTitle>Alle Vorlagen ({templates.length})</CardTitle>
<CardTitle>
{t('templates.allTemplates', { count: templates.length })}
</CardTitle>
</CardHeader>
<CardContent>
<div className="rounded-md border">
<table className="w-full text-sm">
<div className="overflow-x-auto rounded-md border">
<table className="w-full min-w-[640px] text-sm">
<thead>
<tr className="bg-muted/50 border-b">
<th className="p-3 text-left font-medium">Name</th>
<th className="p-3 text-left font-medium">Typ</th>
<th className="p-3 text-left font-medium">
Beschreibung
<th scope="col" className="p-3 text-left font-medium">
{t('templates.name')}
</th>
<th scope="col" className="p-3 text-left font-medium">
{t('templates.type')}
</th>
<th scope="col" className="p-3 text-left font-medium">
{t('templates.description')}
</th>
</tr>
</thead>