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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user