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,4 +1,5 @@
|
||||
import { Users } from 'lucide-react';
|
||||
import { getTranslations } from 'next-intl/server';
|
||||
|
||||
import { createMemberManagementApi } from '@kit/member-management/api';
|
||||
import { getSupabaseServerClient } from '@kit/supabase/server-client';
|
||||
@@ -8,6 +9,7 @@ import { CmsPageShell } from '~/components/cms-page-shell';
|
||||
import { EmptyState } from '~/components/empty-state';
|
||||
|
||||
import { CreateDepartmentDialog } from './create-department-dialog';
|
||||
import { DeleteDepartmentButton } from './delete-department-button';
|
||||
|
||||
interface Props {
|
||||
params: Promise<{ account: string }>;
|
||||
@@ -16,6 +18,7 @@ interface Props {
|
||||
export default async function DepartmentsPage({ params }: Props) {
|
||||
const { account } = await params;
|
||||
const client = getSupabaseServerClient();
|
||||
const t = await getTranslations('members');
|
||||
const { data: acct } = await client
|
||||
.from('accounts')
|
||||
.select('id')
|
||||
@@ -29,8 +32,8 @@ export default async function DepartmentsPage({ params }: Props) {
|
||||
return (
|
||||
<CmsPageShell
|
||||
account={account}
|
||||
title="Abteilungen"
|
||||
description="Sparten und Abteilungen verwalten"
|
||||
title={t('departments.title')}
|
||||
description={t('departments.subtitle')}
|
||||
>
|
||||
<div className="space-y-4">
|
||||
<div className="flex items-center justify-end">
|
||||
@@ -40,16 +43,23 @@ export default async function DepartmentsPage({ params }: Props) {
|
||||
{departments.length === 0 ? (
|
||||
<EmptyState
|
||||
icon={<Users className="h-8 w-8" />}
|
||||
title="Keine Abteilungen vorhanden"
|
||||
description="Erstellen Sie Ihre erste Abteilung."
|
||||
title={t('departments.noDepartments')}
|
||||
description={t('departments.createFirst')}
|
||||
/>
|
||||
) : (
|
||||
<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">Beschreibung</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
{t('departments.name')}
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
{t('departments.description')}
|
||||
</th>
|
||||
<th scope="col" className="p-3 text-left font-medium">
|
||||
{t('departments.actions')}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -62,6 +72,15 @@ export default async function DepartmentsPage({ params }: Props) {
|
||||
<td className="text-muted-foreground p-3">
|
||||
{String(dept.description ?? '—')}
|
||||
</td>
|
||||
<td className="p-3">
|
||||
<div className="flex items-center gap-2">
|
||||
<DeleteDepartmentButton
|
||||
departmentId={String(dept.id)}
|
||||
departmentName={String(dept.name)}
|
||||
accountId={acct.id}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
))}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user