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

@@ -1,6 +1,7 @@
import Link from 'next/link';
import { Plus, Users } from 'lucide-react';
import { getTranslations } from 'next-intl/server';
import { createCourseManagementApi } from '@kit/course-management/api';
import { formatDate } from '@kit/shared/dates';
@@ -27,10 +28,10 @@ const STATUS_VARIANT: Record<
completed: 'outline',
};
const STATUS_LABEL: Record<string, string> = {
enrolled: 'Angemeldet',
const ENROLLMENT_STATUS_LABEL: Record<string, string> = {
enrolled: 'Eingeschrieben',
waitlisted: 'Warteliste',
cancelled: 'Abgemeldet',
cancelled: 'Storniert',
completed: 'Abgeschlossen',
};
@@ -38,6 +39,7 @@ export default async function ParticipantsPage({ params }: PageProps) {
const { account, courseId } = await params;
const client = getSupabaseServerClient();
const api = createCourseManagementApi(client);
const t = await getTranslations('courses');
const [course, participants] = await Promise.all([
api.getCourse(courseId),
@@ -47,45 +49,54 @@ export default async function ParticipantsPage({ params }: PageProps) {
if (!course) return <AccountNotFound />;
return (
<CmsPageShell account={account} title="Teilnehmer">
<CmsPageShell account={account} title={t('participants.title')}>
<div className="flex w-full flex-col gap-6">
<div className="flex items-center justify-between">
<div>
<h1 className="text-2xl font-bold">Teilnehmer</h1>
<p className="text-muted-foreground">
{String((course as Record<string, unknown>).name)} {' '}
{participants.length} Teilnehmer
{participants.length} {t('participants.title')}
</p>
</div>
<Button data-test="participants-add-btn">
<Plus className="mr-2 h-4 w-4" />
Teilnehmer anmelden
{t('participants.add')}
</Button>
</div>
{participants.length === 0 ? (
<EmptyState
icon={<Users className="h-8 w-8" />}
title="Keine Teilnehmer"
description="Melden Sie den ersten Teilnehmer für diesen Kurs an."
actionLabel="Teilnehmer anmelden"
title={t('participants.none')}
description={t('participants.noneDescription')}
actionLabel={t('participants.add')}
/>
) : (
<Card>
<CardHeader>
<CardTitle>Alle Teilnehmer ({participants.length})</CardTitle>
<CardTitle>
{t('participants.allTitle', { count: participants.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">E-Mail</th>
<th className="p-3 text-left font-medium">Telefon</th>
<th className="p-3 text-left font-medium">Status</th>
<th className="p-3 text-left font-medium">
Anmeldedatum
<th scope="col" className="p-3 text-left font-medium">
{t('common.name')}
</th>
<th scope="col" className="p-3 text-left font-medium">
{t('common.email')}
</th>
<th scope="col" className="p-3 text-left font-medium">
{t('common.phone')}
</th>
<th scope="col" className="p-3 text-left font-medium">
{t('common.status')}
</th>
<th scope="col" className="p-3 text-left font-medium">
{t('enrollment.registrationDate')}
</th>
</tr>
</thead>
@@ -107,7 +118,8 @@ export default async function ParticipantsPage({ params }: PageProps) {
STATUS_VARIANT[String(p.status)] ?? 'secondary'
}
>
{STATUS_LABEL[String(p.status)] ?? String(p.status)}
{ENROLLMENT_STATUS_LABEL[String(p.status)] ??
String(p.status)}
</Badge>
</td>
<td className="p-3">