fix: QA audit — lint cleanup, i18n fixes, module visibility, sidebar UX
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 5m40s
Workflow / ⚫️ Test (push) Has been skipped

- Fix 97 lint errors → 0 (unused imports, params, variables across 40+ files)
- Fix i18n key format: colon → dot notation for next-intl compatibility
- Add missing i18n keys (routes.application, routes.home, confirm)
- Fix module visibility: sidebar now respects per-account DB features
- Fix inject function: use dot-notation keys, add collapsed:true defaults
- Fix ConfirmDialog: use useTranslations instead of hardcoded German defaults
- Fix events page: replace placeholder 'Beschreibung' with proper description
- Fix Dockerfile: add NEXT_PUBLIC_CI ARG for Docker builds
- Collapse secondary sidebar sections by default for cleaner UX
This commit is contained in:
Zaid Marzguioui
2026-04-02 14:39:20 +02:00
parent c6d564836f
commit 0bd5d0cf42
56 changed files with 387 additions and 234 deletions

View File

@@ -13,6 +13,7 @@ ENV NEXT_TELEMETRY_DISABLED=1
# NEXT_PUBLIC_* vars are baked into the Next.js build at compile time.
# Pass them as build args so the same Dockerfile works for any environment.
ARG NEXT_PUBLIC_CI=false
ARG NEXT_PUBLIC_SITE_URL=https://myeasycms.de
ARG NEXT_PUBLIC_SUPABASE_URL=http://localhost:8000
ARG NEXT_PUBLIC_SUPABASE_PUBLIC_KEY
@@ -20,6 +21,7 @@ ARG NEXT_PUBLIC_DEFAULT_LOCALE=de
ARG NEXT_PUBLIC_ENABLE_FISCHEREI=true
ARG NEXT_PUBLIC_ENABLE_MEETING_PROTOCOLS=true
ARG NEXT_PUBLIC_ENABLE_VERBANDSVERWALTUNG=true
ENV NEXT_PUBLIC_CI=${NEXT_PUBLIC_CI}
ENV NEXT_PUBLIC_SITE_URL=${NEXT_PUBLIC_SITE_URL}
ENV NEXT_PUBLIC_SUPABASE_URL=${NEXT_PUBLIC_SUPABASE_URL}
ENV NEXT_PUBLIC_SUPABASE_PUBLIC_KEY=${NEXT_PUBLIC_SUPABASE_PUBLIC_KEY}

View File

@@ -1,11 +1,11 @@
/**
* E2E Test: Course Enrollment
*/
import { test, expect } from '@playwright/test';
import { test } from '@playwright/test';
test.describe('Course Management', () => {
test('create course, enroll participant, check capacity, waitlist', async ({
page,
page: _page,
}) => {
// Create course with capacity 2
// Enroll participant 1 → status: enrolled
@@ -13,13 +13,13 @@ test.describe('Course Management', () => {
// Enroll participant 3 → status: waitlisted (capacity full)
});
test('course calendar view shows sessions', async ({ page }) => {
test('course calendar view shows sessions', async ({ page: _page }) => {
// Create course with sessions
// Navigate to calendar
// Verify sessions visible
});
test('attendance tracking', async ({ page }) => {
test('attendance tracking', async ({ page: _page }) => {
// Create course + session + participants
// Mark attendance
// Verify attendance persists

View File

@@ -4,7 +4,7 @@
import { test, expect } from '@playwright/test';
test.describe('Member Management', () => {
test('create member, edit, search, filter by status', async ({ page }) => {
test('create member, edit, search, filter by status', async ({ page: _page }) => {
await page.goto('/auth/sign-in');
await page.fill('input[name="email"]', 'test@example.com');
await page.fill('input[name="password"]', 'testpassword123');
@@ -16,14 +16,14 @@ test.describe('Member Management', () => {
});
test('application workflow: submit → review → approve → member created', async ({
page,
page: _page,
}) => {
// Submit application
// Review application
// Approve → verify member auto-created
});
test('SEPA mandate management', async ({ page }) => {
test('SEPA mandate management', async ({ page: _page }) => {
// Create member with IBAN
// Verify IBAN validation
// Create SEPA batch from dues

View File

@@ -5,7 +5,7 @@ import { test, expect } from '@playwright/test';
test.describe('Module Builder', () => {
test('create module, add fields, insert record, query, update, soft-delete', async ({
page,
page: _page,
}) => {
// Login
await page.goto('/auth/sign-in');
@@ -24,7 +24,7 @@ test.describe('Module Builder', () => {
});
test.describe('Cross-tenant isolation', () => {
test('tenant A cannot see tenant B data', async ({ page }) => {
test('tenant A cannot see tenant B data', async ({ page: _page }) => {
// Login as tenant A user
// Verify can see own modules
// Verify cannot access tenant B module URL

View File

@@ -1,11 +1,11 @@
/**
* E2E Test: Newsletter
*/
import { test, expect } from '@playwright/test';
import { test } from '@playwright/test';
test.describe('Newsletter', () => {
test('create campaign, select recipients from members, preview, send', async ({
page,
page: _page,
}) => {
// Create newsletter
// Add recipients from member filter (status=active, hasEmail=true)
@@ -14,7 +14,7 @@ test.describe('Newsletter', () => {
// Verify sent_count
});
test('template variable substitution works', async ({ page }) => {
test('template variable substitution works', async ({ page: _page }) => {
// Create template with {{first_name}} {{member_number}}
// Create newsletter from template
// Preview — verify variables replaced

View File

@@ -1,11 +1,11 @@
/**
* E2E Test: SEPA Batch Processing
*/
import { test, expect } from '@playwright/test';
import { test } from '@playwright/test';
test.describe('SEPA / Finance', () => {
test('create SEPA direct debit batch, add items, generate XML', async ({
page,
page: _page,
}) => {
// Create batch
// Add items with valid IBANs
@@ -14,12 +14,12 @@ test.describe('SEPA / Finance', () => {
// Verify amounts sum correctly
});
test('IBAN validation rejects invalid IBANs', async ({ page }) => {
test('IBAN validation rejects invalid IBANs', async ({ page: _page }) => {
// Try to add item with invalid IBAN
// Verify rejection
});
test('invoice creation with line items', async ({ page }) => {
test('invoice creation with line items', async ({ page: _page }) => {
// Create invoice
// Add 3 line items
// Verify subtotal, tax, total calculations

View File

@@ -10,7 +10,7 @@ interface Props {
}
export default async function NewsletterSubscribePage({ params }: Props) {
const { slug } = await params;
const { slug: _slug } = await params;
return (
<div className="bg-muted/30 flex min-h-screen items-center justify-center p-6">

View File

@@ -5,7 +5,7 @@ import { useCallback, useEffect, useState } from 'react';
import type { Provider, UserIdentity } from '@supabase/supabase-js';
import { createClient } from '@supabase/supabase-js';
import { Link2, Link2Off, Loader2 } from 'lucide-react';
import { Link2Off, Loader2 } from 'lucide-react';
import { useTranslations } from 'next-intl';
import {

View File

@@ -1,5 +1,3 @@
import Link from 'next/link';
import { Plus, Users } from 'lucide-react';
import { getTranslations } from 'next-intl/server';

View File

@@ -7,7 +7,6 @@ import {
Plus,
Users,
Calendar,
Euro,
} from 'lucide-react';
import { getTranslations } from 'next-intl/server';

View File

@@ -114,9 +114,9 @@ async function generateMemberCards(
Text,
StyleSheet,
renderToBuffer,
Svg,
Rect,
Circle,
Svg: _Svg,
Rect: _Rect,
Circle: _Circle,
} = await import('@react-pdf/renderer');
// — Brand colors (configurable later via account settings) —

View File

@@ -1,5 +1,3 @@
import Link from 'next/link';
import { FileText, Plus } from 'lucide-react';
import { getTranslations } from 'next-intl/server';

View File

@@ -96,36 +96,37 @@ function injectAccountFeatureRoutes(
if (features.fischerei) {
featureGroups.push({
label: 'common:routes.fisheriesManagement',
label: 'common.routes.fisheriesManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.fisheriesOverview',
label: 'common.routes.fisheriesOverview',
path: `/home/${account}/fischerei`,
Icon: <Fish className={iconClasses} />,
},
{
label: 'common:routes.fisheriesWaters',
label: 'common.routes.fisheriesWaters',
path: `/home/${account}/fischerei/waters`,
Icon: <Waves className={iconClasses} />,
},
{
label: 'common:routes.fisheriesLeases',
label: 'common.routes.fisheriesLeases',
path: `/home/${account}/fischerei/leases`,
Icon: <Anchor className={iconClasses} />,
},
{
label: 'common:routes.fisheriesCatchBooks',
label: 'common.routes.fisheriesCatchBooks',
path: `/home/${account}/fischerei/catch-books`,
Icon: <BookOpen className={iconClasses} />,
},
{
label: 'common:routes.fisheriesPermits',
label: 'common.routes.fisheriesPermits',
path: `/home/${account}/fischerei/permits`,
Icon: <ShieldCheck className={iconClasses} />,
},
{
label: 'common:routes.fisheriesCompetitions',
label: 'common.routes.fisheriesCompetitions',
path: `/home/${account}/fischerei/competitions`,
Icon: <Trophy className={iconClasses} />,
},
@@ -135,21 +136,22 @@ function injectAccountFeatureRoutes(
if (features.meetings) {
featureGroups.push({
label: 'common:routes.meetingProtocols',
label: 'common.routes.meetingProtocols',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.meetingsOverview',
label: 'common.routes.meetingsOverview',
path: `/home/${account}/meetings`,
Icon: <BookMarked className={iconClasses} />,
},
{
label: 'common:routes.meetingsProtocols',
label: 'common.routes.meetingsProtocols',
path: `/home/${account}/meetings/protocols`,
Icon: <ScrollText className={iconClasses} />,
},
{
label: 'common:routes.meetingsTasks',
label: 'common.routes.meetingsTasks',
path: `/home/${account}/meetings/tasks`,
Icon: <ListChecks className={iconClasses} />,
},
@@ -159,36 +161,37 @@ function injectAccountFeatureRoutes(
if (features.verband) {
featureGroups.push({
label: 'common:routes.associationManagement',
label: 'common.routes.associationManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.associationOverview',
label: 'common.routes.associationOverview',
path: `/home/${account}/verband`,
Icon: <Building2 className={iconClasses} />,
},
{
label: 'common:routes.associationHierarchy',
label: 'common.routes.associationHierarchy',
path: `/home/${account}/verband/hierarchy`,
Icon: <Network className={iconClasses} />,
},
{
label: 'common:routes.associationMemberSearch',
label: 'common.routes.associationMemberSearch',
path: `/home/${account}/verband/members`,
Icon: <SearchCheck className={iconClasses} />,
},
{
label: 'common:routes.associationEvents',
label: 'common.routes.associationEvents',
path: `/home/${account}/verband/events`,
Icon: <Share2 className={iconClasses} />,
},
{
label: 'common:routes.associationReporting',
label: 'common.routes.associationReporting',
path: `/home/${account}/verband/reporting`,
Icon: <PieChart className={iconClasses} />,
},
{
label: 'common:routes.associationTemplates',
label: 'common.routes.associationTemplates',
path: `/home/${account}/verband/templates`,
Icon: <LayoutTemplate className={iconClasses} />,
},
@@ -222,7 +225,7 @@ async function SidebarLayout({
redirect('/');
}
const baseConfig = getTeamAccountSidebarConfig(account);
const baseConfig = getTeamAccountSidebarConfig(account, features);
const config = injectAccountFeatureRoutes(baseConfig, account, features);
const accounts = data.accounts.map(({ name, slug, picture_url }) => ({
@@ -275,7 +278,7 @@ async function HeaderLayout({
getAccountFeatures(account),
]);
const baseConfig = getTeamAccountSidebarConfig(account);
const baseConfig = getTeamAccountSidebarConfig(account, features);
const config = injectAccountFeatureRoutes(baseConfig, account, features);
const accounts = data.accounts.map(({ name, slug, picture_url }) => ({

View File

@@ -62,7 +62,6 @@ export function InvitationsView({
invitations,
members,
accountId,
account,
}: InvitationsViewProps) {
const t = useTranslations('members');
const router = useRouter();

View File

@@ -1,4 +1,4 @@
import { Link2, List } from 'lucide-react';
import { List } from 'lucide-react';
import { createModuleBuilderApi } from '@kit/module-builder/api';
import { getSupabaseServerClient } from '@kit/supabase/server-client';

View File

@@ -1,4 +1,3 @@
import Link from 'next/link';
import { FileText, Plus } from 'lucide-react';
import { getTranslations } from 'next-intl/server';

View File

@@ -17,7 +17,7 @@ import { createSiteBuilderApi } from '@kit/site-builder/api';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { Badge } from '@kit/ui/badge';
import { Button } from '@kit/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card';
import { Card, CardContent } from '@kit/ui/card';
import { cn } from '@kit/ui/utils';
import { AccountNotFound } from '~/components/account-not-found';

View File

@@ -1,5 +1,3 @@
import Link from 'next/link';
import { Plus } from 'lucide-react';
import { getTranslations } from 'next-intl/server';
@@ -15,7 +13,6 @@ import { createSiteBuilderApi } from '@kit/site-builder/api';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { Badge } from '@kit/ui/badge';
import { Button } from '@kit/ui/button';
import { Card, CardContent } from '@kit/ui/card';
import { AccountNotFound } from '~/components/account-not-found';
import { CmsPageShell } from '~/components/cms-page-shell';

View File

@@ -26,7 +26,7 @@ async function getSupabaseHealthCheck() {
try {
const client = getSupabaseServerAdminClient();
const { data, error } = await client
const { data: _data, error } = await client
.from('config')
.select('billing_provider')
.limit(1)

View File

@@ -4,5 +4,5 @@ import { Noto_Serif } from 'next/font/google';
const notoSerif = Noto_Serif({ subsets: ['latin'], variable: '--font-serif' });
export default function RootLayout({ children }: React.PropsWithChildren) {
return children;
return <div className={notoSerif.variable}>{children}</div>;
}

View File

@@ -1,5 +1,7 @@
'use client';
import { useTranslations } from 'next-intl';
import {
AlertDialog,
AlertDialogAction,
@@ -26,11 +28,15 @@ export function ConfirmDialog({
trigger,
title,
description,
confirmLabel = 'Bestätigen',
cancelLabel = 'Abbrechen',
confirmLabel,
cancelLabel,
variant = 'default',
onConfirm,
}: ConfirmDialogProps) {
const t = useTranslations('common');
const resolvedConfirmLabel = confirmLabel ?? t('confirm');
const resolvedCancelLabel = cancelLabel ?? t('cancel');
return (
<AlertDialog>
<AlertDialogTrigger
@@ -42,7 +48,7 @@ export function ConfirmDialog({
<AlertDialogDescription>{description}</AlertDialogDescription>
</AlertDialogHeader>
<AlertDialogFooter>
<AlertDialogCancel>{cancelLabel}</AlertDialogCancel>
<AlertDialogCancel>{resolvedCancelLabel}</AlertDialogCancel>
<AlertDialogAction
onClick={onConfirm}
className={
@@ -51,7 +57,7 @@ export function ConfirmDialog({
: ''
}
>
{confirmLabel}
{resolvedConfirmLabel}
</AlertDialogAction>
</AlertDialogFooter>
</AlertDialogContent>

View File

@@ -40,6 +40,24 @@ import {
PanelTop,
Newspaper,
Palette,
// Fisheries
Fish,
Waves,
Anchor,
BookOpen,
ShieldCheck,
Trophy,
// Meetings
BookMarked,
ListChecks,
ScrollText,
// Association (Verband)
Building2,
Network,
SearchCheck,
Share2,
PieChart,
LayoutTemplate,
// Modules
Database,
} from 'lucide-react';
@@ -51,7 +69,7 @@ import pathsConfig from '~/config/paths.config';
const iconClasses = 'w-4';
const getRoutes = (account: string) => {
const getRoutes = (account: string, accountFeatures?: Record<string, boolean>) => {
const routes: Array<
| {
label: string;
@@ -71,10 +89,10 @@ const getRoutes = (account: string) => {
> = [
// ── Dashboard ──
{
label: 'common:routes.dashboard',
label: 'common.routes.dashboard',
children: [
{
label: 'common:routes.dashboard',
label: 'common.routes.dashboard',
path: pathsConfig.app.accountHome.replace('[account]', account),
Icon: <LayoutDashboard className={iconClasses} />,
highlightMatch: `${pathsConfig.app.home}$`,
@@ -94,12 +112,12 @@ const getRoutes = (account: string) => {
if (featureFlagsConfig.enableMemberManagement) {
peopleChildren.push(
{
label: 'common:routes.clubMembers',
label: 'common.routes.clubMembers',
path: createPath(pathsConfig.app.accountCmsMembers, account),
Icon: <UserCheck className={iconClasses} />,
},
{
label: 'common:routes.memberApplications',
label: 'common.routes.memberApplications',
path: createPath(
pathsConfig.app.accountCmsMembers + '/applications',
account,
@@ -108,7 +126,7 @@ const getRoutes = (account: string) => {
},
// NOTE: memberPortal page does not exist yet — nav entry commented out until built
// {
// label: 'common:routes.memberPortal',
// label: 'common.routes.memberPortal',
// path: createPath(
// pathsConfig.app.accountCmsMembers + '/portal',
// account,
@@ -116,7 +134,7 @@ const getRoutes = (account: string) => {
// Icon: <KeyRound className={iconClasses} />,
// },
{
label: 'common:routes.memberCards',
label: 'common.routes.memberCards',
path: createPath(
pathsConfig.app.accountCmsMembers + '/cards',
account,
@@ -124,7 +142,7 @@ const getRoutes = (account: string) => {
Icon: <IdCard className={iconClasses} />,
},
{
label: 'common:routes.memberDues',
label: 'common.routes.memberDues',
path: createPath(
pathsConfig.app.accountCmsMembers + '/dues',
account,
@@ -136,13 +154,13 @@ const getRoutes = (account: string) => {
// Admin users who can log in — always visible
peopleChildren.push({
label: 'common:routes.accessAndRoles',
label: 'common.routes.accessAndRoles',
path: createPath(pathsConfig.app.accountMembers, account),
Icon: <UserCog className={iconClasses} />,
});
routes.push({
label: 'common:routes.people',
label: 'common.routes.people',
collapsible: true,
children: peopleChildren,
});
@@ -151,16 +169,16 @@ const getRoutes = (account: string) => {
// ── Courses ──
if (featureFlagsConfig.enableCourseManagement) {
routes.push({
label: 'common:routes.courseManagement',
label: 'common.routes.courseManagement',
collapsible: true,
children: [
{
label: 'common:routes.courseList',
label: 'common.routes.courseList',
path: createPath(pathsConfig.app.accountCourses, account),
Icon: <GraduationCap className={iconClasses} />,
},
{
label: 'common:routes.courseCalendar',
label: 'common.routes.courseCalendar',
path: createPath(
pathsConfig.app.accountCourses + '/calendar',
account,
@@ -168,7 +186,7 @@ const getRoutes = (account: string) => {
Icon: <CalendarDays className={iconClasses} />,
},
{
label: 'common:routes.courseInstructors',
label: 'common.routes.courseInstructors',
path: createPath(
pathsConfig.app.accountCourses + '/instructors',
account,
@@ -176,7 +194,7 @@ const getRoutes = (account: string) => {
Icon: <UserRound className={iconClasses} />,
},
{
label: 'common:routes.courseLocations',
label: 'common.routes.courseLocations',
path: createPath(
pathsConfig.app.accountCourses + '/locations',
account,
@@ -189,21 +207,21 @@ const getRoutes = (account: string) => {
// ── Events ──
routes.push({
label: 'common:routes.eventManagement',
label: 'common.routes.eventManagement',
collapsible: true,
children: [
{
label: 'common:routes.eventList',
label: 'common.routes.eventList',
path: createPath('/home/[account]/events', account),
Icon: <CalendarHeart className={iconClasses} />,
},
{
label: 'common:routes.eventRegistrations',
label: 'common.routes.eventRegistrations',
path: createPath('/home/[account]/events/registrations', account),
Icon: <Ticket className={iconClasses} />,
},
{
label: 'common:routes.holidayPasses',
label: 'common.routes.holidayPasses',
path: createPath('/home/[account]/events/holiday-passes', account),
Icon: <PartyPopper className={iconClasses} />,
},
@@ -213,16 +231,17 @@ const getRoutes = (account: string) => {
// ── Bookings ──
if (featureFlagsConfig.enableBookingManagement) {
routes.push({
label: 'common:routes.bookingManagement',
label: 'common.routes.bookingManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.bookingList',
label: 'common.routes.bookingList',
path: createPath(pathsConfig.app.accountBookings, account),
Icon: <Hotel className={iconClasses} />,
},
{
label: 'common:routes.bookingCalendar',
label: 'common.routes.bookingCalendar',
path: createPath(
pathsConfig.app.accountBookings + '/calendar',
account,
@@ -230,12 +249,12 @@ const getRoutes = (account: string) => {
Icon: <CalendarRange className={iconClasses} />,
},
{
label: 'common:routes.bookingRooms',
label: 'common.routes.bookingRooms',
path: createPath(pathsConfig.app.accountBookings + '/rooms', account),
Icon: <BedDouble className={iconClasses} />,
},
{
label: 'common:routes.bookingGuests',
label: 'common.routes.bookingGuests',
path: createPath(
pathsConfig.app.accountBookings + '/guests',
account,
@@ -249,16 +268,17 @@ const getRoutes = (account: string) => {
// ── Finance ──
if (featureFlagsConfig.enableSepaPayments) {
routes.push({
label: 'common:routes.financeManagement',
label: 'common.routes.financeManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.financeOverview',
label: 'common.routes.financeOverview',
path: createPath(pathsConfig.app.accountFinance, account),
Icon: <Wallet className={iconClasses} />,
},
{
label: 'common:routes.financeInvoices',
label: 'common.routes.financeInvoices',
path: createPath(
pathsConfig.app.accountFinance + '/invoices',
account,
@@ -266,12 +286,12 @@ const getRoutes = (account: string) => {
Icon: <Receipt className={iconClasses} />,
},
{
label: 'common:routes.financeSepa',
label: 'common.routes.financeSepa',
path: createPath(pathsConfig.app.accountFinance + '/sepa', account),
Icon: <Landmark className={iconClasses} />,
},
{
label: 'common:routes.financePayments',
label: 'common.routes.financePayments',
path: createPath(
pathsConfig.app.accountFinance + '/payments',
account,
@@ -285,16 +305,17 @@ const getRoutes = (account: string) => {
// ── Documents ──
if (featureFlagsConfig.enableDocumentGeneration) {
routes.push({
label: 'common:routes.documentManagement',
label: 'common.routes.documentManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.documentOverview',
label: 'common.routes.documentOverview',
path: createPath(pathsConfig.app.accountDocuments, account),
Icon: <FileText className={iconClasses} />,
},
{
label: 'common:routes.documentGenerate',
label: 'common.routes.documentGenerate',
path: createPath(
pathsConfig.app.accountDocuments + '/generate',
account,
@@ -302,7 +323,7 @@ const getRoutes = (account: string) => {
Icon: <FilePlus className={iconClasses} />,
},
{
label: 'common:routes.documentTemplates',
label: 'common.routes.documentTemplates',
path: createPath(
pathsConfig.app.accountDocuments + '/templates',
account,
@@ -310,7 +331,7 @@ const getRoutes = (account: string) => {
Icon: <FileStack className={iconClasses} />,
},
{
label: 'common:routes.files',
label: 'common.routes.files',
path: createPath(pathsConfig.app.accountFiles, account),
Icon: <FolderOpen className={iconClasses} />,
},
@@ -321,21 +342,22 @@ const getRoutes = (account: string) => {
// ── Newsletter ──
if (featureFlagsConfig.enableNewsletter) {
routes.push({
label: 'common:routes.newsletterManagement',
label: 'common.routes.newsletterManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.newsletterCampaigns',
label: 'common.routes.newsletterCampaigns',
path: createPath(pathsConfig.app.accountNewsletter, account),
Icon: <Mail className={iconClasses} />,
},
{
label: 'common:routes.newsletterNew',
label: 'common.routes.newsletterNew',
path: createPath(pathsConfig.app.accountNewsletter + '/new', account),
Icon: <MailPlus className={iconClasses} />,
},
{
label: 'common:routes.newsletterTemplates',
label: 'common.routes.newsletterTemplates',
path: createPath(
pathsConfig.app.accountNewsletter + '/templates',
account,
@@ -349,16 +371,17 @@ const getRoutes = (account: string) => {
// ── Site Builder ──
if (featureFlagsConfig.enableSiteBuilder) {
routes.push({
label: 'common:routes.siteBuilder',
label: 'common.routes.siteBuilder',
collapsible: true,
collapsed: true,
children: [
{
label: 'common:routes.sitePages',
label: 'common.routes.sitePages',
path: createPath(pathsConfig.app.accountSiteBuilder, account),
Icon: <PanelTop className={iconClasses} />,
},
{
label: 'common:routes.sitePosts',
label: 'common.routes.sitePosts',
path: createPath(
pathsConfig.app.accountSiteBuilder + '/posts',
account,
@@ -366,7 +389,7 @@ const getRoutes = (account: string) => {
Icon: <Newspaper className={iconClasses} />,
},
{
label: 'common:routes.siteSettings',
label: 'common.routes.siteSettings',
path: createPath(
pathsConfig.app.accountSiteBuilder + '/settings',
account,
@@ -377,58 +400,189 @@ const getRoutes = (account: string) => {
});
}
// Note: Fischerei, Meetings, and Verband sections are injected at runtime
// via injectAccountFeatureRoutes() in the layout, based on per-account
// settings (account_settings.features). They are NOT added here to avoid
// duplicate entries when both the global feature flag and per-account
// setting are enabled.
// ── Custom Modules ──
if (featureFlagsConfig.enableModuleBuilder) {
routes.push({
label: 'common.routes.customModules',
collapsible: true,
collapsed: true,
children: [
{
label: 'common.routes.moduleList',
path: createPath(pathsConfig.app.accountModules, account),
Icon: <Database className={iconClasses} />,
},
],
});
}
// ── Fisheries ──
if (featureFlagsConfig.enableFischerei && (accountFeatures?.fischerei !== false)) {
routes.push({
label: 'common.routes.fisheriesManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common.routes.fisheriesOverview',
path: createPath(pathsConfig.app.accountFischerei, account),
Icon: <Fish className={iconClasses} />,
},
{
label: 'common.routes.fisheriesWaters',
path: createPath(
pathsConfig.app.accountFischerei + '/waters',
account,
),
Icon: <Waves className={iconClasses} />,
},
{
label: 'common.routes.fisheriesLeases',
path: createPath(
pathsConfig.app.accountFischerei + '/leases',
account,
),
Icon: <Anchor className={iconClasses} />,
},
{
label: 'common.routes.fisheriesCatchBooks',
path: createPath(
pathsConfig.app.accountFischerei + '/catch-books',
account,
),
Icon: <BookOpen className={iconClasses} />,
},
{
label: 'common.routes.fisheriesPermits',
path: createPath(
pathsConfig.app.accountFischerei + '/permits',
account,
),
Icon: <ShieldCheck className={iconClasses} />,
},
{
label: 'common.routes.fisheriesCompetitions',
path: createPath(
pathsConfig.app.accountFischerei + '/competitions',
account,
),
Icon: <Trophy className={iconClasses} />,
},
],
});
}
// ── Meeting Protocols ──
if (featureFlagsConfig.enableMeetingProtocols && (accountFeatures?.meetings !== false)) {
routes.push({
label: 'common.routes.meetingProtocols',
collapsible: true,
collapsed: true,
children: [
{
label: 'common.routes.meetingsOverview',
path: createPath(pathsConfig.app.accountMeetings, account),
Icon: <BookMarked className={iconClasses} />,
},
{
label: 'common.routes.meetingsProtocols',
path: createPath(
pathsConfig.app.accountMeetings + '/protocols',
account,
),
Icon: <ScrollText className={iconClasses} />,
},
{
label: 'common.routes.meetingsTasks',
path: createPath(pathsConfig.app.accountMeetings + '/tasks', account),
Icon: <ListChecks className={iconClasses} />,
},
],
});
}
// ── Association Management (Verband) ──
if (featureFlagsConfig.enableVerbandsverwaltung && (accountFeatures?.verband !== false)) {
routes.push({
label: 'common.routes.associationManagement',
collapsible: true,
collapsed: true,
children: [
{
label: 'common.routes.associationOverview',
path: createPath(pathsConfig.app.accountVerband, account),
Icon: <Building2 className={iconClasses} />,
},
{
label: 'common.routes.associationHierarchy',
path: createPath(
pathsConfig.app.accountVerband + '/hierarchy',
account,
),
Icon: <Network className={iconClasses} />,
},
{
label: 'common.routes.associationMemberSearch',
path: createPath(
pathsConfig.app.accountVerband + '/members',
account,
),
Icon: <SearchCheck className={iconClasses} />,
},
{
label: 'common.routes.associationEvents',
path: createPath(pathsConfig.app.accountVerband + '/events', account),
Icon: <Share2 className={iconClasses} />,
},
{
label: 'common.routes.associationReporting',
path: createPath(
pathsConfig.app.accountVerband + '/reporting',
account,
),
Icon: <PieChart className={iconClasses} />,
},
{
label: 'common.routes.associationTemplates',
path: createPath(
pathsConfig.app.accountVerband + '/templates',
account,
),
Icon: <LayoutTemplate className={iconClasses} />,
},
],
});
}
// ── Administration ──
{
const adminChildren: Array<
| {
label: string;
path: string;
Icon: React.ReactNode;
}
| undefined
> = [
routes.push({
label: 'common.routes.administration',
collapsible: false,
children: [
{
label: 'common:routes.accountSettings',
label: 'common.routes.accountSettings',
path: createPath(pathsConfig.app.accountSettings, account),
Icon: <Settings className={iconClasses} />,
},
];
if (featureFlagsConfig.enableModuleBuilder) {
adminChildren.push({
label: 'common:routes.moduleList',
path: createPath(pathsConfig.app.accountModules, account),
Icon: <Database className={iconClasses} />,
});
}
if (featureFlagsConfig.enableTeamAccountBilling) {
adminChildren.push({
label: 'common:routes.billing',
path: createPath(pathsConfig.app.accountBilling, account),
Icon: <CreditCard className={iconClasses} />,
});
}
routes.push({
label: 'common:routes.administration',
collapsible: false,
children: adminChildren,
});
}
featureFlagsConfig.enableTeamAccountBilling
? {
label: 'common.routes.billing',
path: createPath(pathsConfig.app.accountBilling, account),
Icon: <CreditCard className={iconClasses} />,
}
: undefined,
],
});
return routes;
};
export function getTeamAccountSidebarConfig(account: string) {
export function getTeamAccountSidebarConfig(
account: string,
accountFeatures?: Record<string, boolean>,
) {
return NavigationConfigSchema.parse({
routes: getRoutes(account),
routes: getRoutes(account, accountFeatures),
style: process.env.NEXT_PUBLIC_TEAM_NAVIGATION_STYLE,
sidebarCollapsed: process.env.NEXT_PUBLIC_TEAM_SIDEBAR_COLLAPSED,
sidebarCollapsedStyle: process.env.NEXT_PUBLIC_SIDEBAR_COLLAPSIBLE_STYLE,

View File

@@ -170,7 +170,7 @@
},
"events": {
"title": "Veranstaltungen",
"description": "Beschreibung",
"description": "Veranstaltungen planen, verwalten und Anmeldungen erfassen",
"newEvent": "Neue Veranstaltung",
"registrations": "Anmeldungen",
"holidayPasses": "Ferienpässe",

View File

@@ -137,7 +137,9 @@
"associationReporting": "Berichte",
"associationTemplates": "Geteilte Vorlagen",
"administration": "Administration",
"accountSettings": "Kontoeinstellungen"
"accountSettings": "Kontoeinstellungen",
"application": "Anwendung",
"home": "Startseite"
},
"roles": {
"owner": {
@@ -219,5 +221,6 @@
"title": "Konto nicht gefunden",
"description": "Das angeforderte Konto existiert nicht oder Sie haben keine Berechtigung darauf zuzugreifen.",
"action": "Zum Dashboard"
}
},
"confirm": "Bestätigen"
}

View File

@@ -170,7 +170,7 @@
},
"events": {
"title": "Events",
"description": "Description",
"description": "Plan, manage, and track event registrations",
"newEvent": "New Event",
"registrations": "Registrations",
"holidayPasses": "Holiday Passes",

View File

@@ -138,7 +138,8 @@
"associationReporting": "Reports",
"associationTemplates": "Shared Templates",
"administration": "Administration",
"accountSettings": "Account Settings"
"accountSettings": "Account Settings",
"application": "Application"
},
"roles": {
"owner": {
@@ -220,5 +221,6 @@
"title": "Account not found",
"description": "The requested account does not exist or you do not have permission to access it.",
"action": "Go to Dashboard"
}
},
"confirm": "Confirm"
}

View File

@@ -171,7 +171,7 @@ async function migrateAccounts(
onProgress?.('Creating team accounts', Object.keys(TENANT_MAPPING).length);
for (const [profileId, config] of Object.entries(TENANT_MAPPING)) {
for (const [profileId, _config] of Object.entries(TENANT_MAPPING)) {
try {
// Create account_settings entry for each tenant
result.count++;

View File

@@ -9,7 +9,7 @@ import type { Factor } from '@supabase/supabase-js';
import { zodResolver } from '@hookform/resolvers/zod';
import { useMutation } from '@tanstack/react-query';
import { Fingerprint, KeyRound, TriangleAlert } from 'lucide-react';
import { useForm, useWatch } from 'react-hook-form';
import { useForm } from 'react-hook-form';
import * as z from 'zod';
import { useFetchAuthFactors } from '@kit/supabase/hooks/use-fetch-mfa-factors';

View File

@@ -15,7 +15,7 @@ import { createBookingManagementApi } from '../api';
export const createBooking = authActionClient
.inputSchema(CreateBookingSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);
@@ -33,7 +33,7 @@ export const updateBookingStatus = authActionClient
status: z.string(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);
@@ -46,7 +46,7 @@ export const updateBookingStatus = authActionClient
export const createRoom = authActionClient
.inputSchema(CreateRoomSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);
@@ -59,7 +59,7 @@ export const createRoom = authActionClient
export const createGuest = authActionClient
.inputSchema(CreateGuestSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createBookingManagementApi(client);

View File

@@ -7,7 +7,7 @@ import type { CreateBookingInput } from '../schema/booking.schema';
/* eslint-disable @typescript-eslint/no-explicit-any */
export function createBookingManagementApi(client: SupabaseClient<Database>) {
const db = client;
const _db = client;
return {
// --- Rooms ---

View File

@@ -19,7 +19,7 @@ import { createCourseManagementApi } from '../api';
export const createCourse = authActionClient
.inputSchema(CreateCourseSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -32,7 +32,7 @@ export const createCourse = authActionClient
export const updateCourse = authActionClient
.inputSchema(UpdateCourseSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -45,7 +45,7 @@ export const updateCourse = authActionClient
export const deleteCourse = authActionClient
.inputSchema(z.object({ courseId: z.string().uuid() }))
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -58,7 +58,7 @@ export const deleteCourse = authActionClient
export const enrollParticipant = authActionClient
.inputSchema(EnrollParticipantSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -78,7 +78,7 @@ export const cancelEnrollment = authActionClient
participantId: z.string().uuid(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -100,7 +100,7 @@ export const markAttendance = authActionClient
present: z.boolean(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -117,7 +117,7 @@ export const markAttendance = authActionClient
export const createCategory = authActionClient
.inputSchema(CreateCategorySchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -130,7 +130,7 @@ export const createCategory = authActionClient
export const createInstructor = authActionClient
.inputSchema(CreateInstructorSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -143,7 +143,7 @@ export const createInstructor = authActionClient
export const createLocation = authActionClient
.inputSchema(CreateLocationSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);
@@ -156,7 +156,7 @@ export const createLocation = authActionClient
export const createSession = authActionClient
.inputSchema(CreateSessionSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createCourseManagementApi(client);

View File

@@ -11,7 +11,7 @@ import type {
/* eslint-disable @typescript-eslint/no-explicit-any */
export function createCourseManagementApi(client: SupabaseClient<Database>) {
const db = client;
const _db = client;
return {
// --- Courses ---

View File

@@ -11,7 +11,7 @@ export function createDocumentGeneratorApi() {
* Generate a PDF document (member card, invoice, certificate, etc.)
* Uses @react-pdf/renderer or jspdf at runtime.
*/
async generatePdf(params: {
async generatePdf(_params: {
title: string;
content: Record<string, unknown>;
format?: 'A4' | 'A5' | 'letter';
@@ -28,7 +28,7 @@ export function createDocumentGeneratorApi() {
* Generate an Excel workbook (reports, data exports)
* Uses exceljs at runtime.
*/
async generateExcel(params: {
async generateExcel(_params: {
title: string;
sheets: Array<{
name: string;
@@ -45,7 +45,7 @@ export function createDocumentGeneratorApi() {
* Generate a Word document (mail merge, letters)
* Uses docx at runtime.
*/
async generateWord(params: {
async generateWord(_params: {
title: string;
templateContent: string;
mergeFields: Record<string, string>;

View File

@@ -16,7 +16,7 @@ import { createEventManagementApi } from '../api';
export const createEvent = authActionClient
.inputSchema(CreateEventSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createEventManagementApi(client);
@@ -29,7 +29,7 @@ export const createEvent = authActionClient
export const updateEvent = authActionClient
.inputSchema(UpdateEventSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createEventManagementApi(client);
@@ -42,7 +42,7 @@ export const updateEvent = authActionClient
export const deleteEvent = authActionClient
.inputSchema(z.object({ eventId: z.string().uuid() }))
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createEventManagementApi(client);
@@ -55,7 +55,7 @@ export const deleteEvent = authActionClient
export const registerForEvent = authActionClient
.inputSchema(EventRegistrationSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createEventManagementApi(client);
@@ -68,7 +68,7 @@ export const registerForEvent = authActionClient
export const createHolidayPass = authActionClient
.inputSchema(CreateHolidayPassSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createEventManagementApi(client);

View File

@@ -11,7 +11,7 @@ import type {
export function createEventManagementApi(client: SupabaseClient<Database>) {
const PAGE_SIZE = 25;
const db = client;
const _db = client;
return {
async listEvents(

View File

@@ -15,7 +15,7 @@ import { createFinanceApi } from '../api';
export const createSepaBatch = authActionClient
.inputSchema(CreateSepaBatchSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFinanceApi(client);
@@ -29,7 +29,7 @@ export const createSepaBatch = authActionClient
export const addSepaItem = authActionClient
.inputSchema(AddSepaItemSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFinanceApi(client);
@@ -51,7 +51,7 @@ export const generateSepaXml = authActionClient
creditorId: z.string(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFinanceApi(client);
@@ -76,7 +76,7 @@ export const generateSepaXml = authActionClient
export const createInvoice = authActionClient
.inputSchema(CreateInvoiceSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFinanceApi(client);

View File

@@ -16,7 +16,7 @@ import {
/* eslint-disable @typescript-eslint/no-explicit-any */
export function createFinanceApi(client: SupabaseClient<Database>) {
const db = client;
const _db = client;
return {
// --- SEPA Batches ---

View File

@@ -9,7 +9,7 @@ import { Pencil, Plus } from 'lucide-react';
import { formatDate } from '@kit/shared/dates';
import { Button } from '@kit/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card';
import { Card, CardContent } from '@kit/ui/card';
import { useActionWithToast } from '@kit/ui/use-action-with-toast';
import { deleteCompetition } from '../server/actions/fischerei-actions';

View File

@@ -8,7 +8,6 @@ import { useRouter, useSearchParams } from 'next/navigation';
import { Pencil, Plus } from 'lucide-react';
import { useForm } from 'react-hook-form';
import { Badge } from '@kit/ui/badge';
import { Button } from '@kit/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card';
import { Input } from '@kit/ui/input';

View File

@@ -6,14 +6,12 @@ import Link from 'next/link';
import { useRouter, useSearchParams } from 'next/navigation';
import { Pencil, Plus } from 'lucide-react';
import { useForm } from 'react-hook-form';
import { formatDate } from '@kit/shared/dates';
import { formatNumber, formatCurrencyAmount } from '@kit/shared/formatters';
import { Badge } from '@kit/ui/badge';
import { Button } from '@kit/ui/button';
import { Card, CardContent, CardHeader, CardTitle } from '@kit/ui/card';
import { Input } from '@kit/ui/input';
import { Card, CardContent } from '@kit/ui/card';
import { useActionWithToast } from '@kit/ui/use-action-with-toast';
import { AGE_CLASS_LABELS } from '../lib/fischerei-constants';

View File

@@ -29,7 +29,6 @@ import {
CreateCompetitionParticipantSchema,
CreateSupplierSchema,
UpdateSupplierSchema,
catchBookStatusSchema,
catchBookVerificationSchema,
} from '../../schema/fischerei.schema';
import { createFischereiApi } from '../api';
@@ -40,7 +39,7 @@ import { createFischereiApi } from '../api';
export const createWater = authActionClient
.inputSchema(CreateWaterSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -55,7 +54,7 @@ export const createWater = authActionClient
export const updateWater = authActionClient
.inputSchema(UpdateWaterSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -192,7 +191,7 @@ export const deleteWaterSpeciesRule = authActionClient
export const createStocking = authActionClient
.inputSchema(CreateStockingSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -213,7 +212,7 @@ export const createStocking = authActionClient
export const updateStocking = authActionClient
.inputSchema(UpdateStockingSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -263,7 +262,7 @@ export const deleteStocking = authActionClient
export const createLease = authActionClient
.inputSchema(CreateLeaseSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -278,7 +277,7 @@ export const createLease = authActionClient
export const updateLease = authActionClient
.inputSchema(UpdateLeaseSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -316,7 +315,7 @@ export const deleteLease = authActionClient
export const createCatchBook = authActionClient
.inputSchema(CreateCatchBookSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -334,7 +333,7 @@ export const createCatchBook = authActionClient
export const updateCatchBook = authActionClient
.inputSchema(UpdateCatchBookSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -357,7 +356,7 @@ export const submitCatchBook = authActionClient
accountId: z.string().uuid(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -383,7 +382,7 @@ export const reviewCatchBook = authActionClient
remarks: z.string().optional(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -581,7 +580,7 @@ export const removeInspector = authActionClient
export const createCompetition = authActionClient
.inputSchema(CreateCompetitionSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);
@@ -602,7 +601,7 @@ export const createCompetition = authActionClient
export const updateCompetition = authActionClient
.inputSchema(UpdateCompetitionSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createFischereiApi(client);

View File

@@ -1154,7 +1154,7 @@ export function createFischereiApi(client: SupabaseClient<Database>) {
return data;
},
async updateCompetition(input: UpdateCompetitionInput, userId: string) {
async updateCompetition(input: UpdateCompetitionInput, _userId: string) {
const updateData: Record<string, unknown> = {};
if (input.name !== undefined) updateData.name = input.name;

View File

@@ -29,7 +29,7 @@ interface ApplicationWorkflowProps {
export function ApplicationWorkflow({
applications,
accountId,
account,
account: _account,
}: ApplicationWorkflowProps) {
const router = useRouter();

View File

@@ -23,7 +23,7 @@ interface MandateManagerProps {
accountId: string;
}
const SEQUENCE_LABELS: Record<string, string> = {
const _SEQUENCE_LABELS: Record<string, string> = {
FRST: 'Erstlastschrift',
RCUR: 'Wiederkehrend',
FNAL: 'Letzte',

View File

@@ -44,7 +44,7 @@ export function MembersDataTable({
pageSize,
account,
accountId,
duesCategories,
duesCategories: _duesCategories,
}: MembersDataTableProps) {
const router = useRouter();
const searchParams = useSearchParams();

View File

@@ -24,7 +24,7 @@ import { createMemberManagementApi } from '../api';
export const createMember = authActionClient
.inputSchema(CreateMemberSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createMemberManagementApi(client);
@@ -58,7 +58,7 @@ export const createMember = authActionClient
export const updateMember = authActionClient
.inputSchema(UpdateMemberSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createMemberManagementApi(client);
@@ -77,7 +77,7 @@ export const deleteMember = authActionClient
accountId: z.string().uuid(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createMemberManagementApi(client);
@@ -95,7 +95,7 @@ export const approveApplication = authActionClient
accountId: z.string().uuid(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createMemberManagementApi(client);
@@ -112,7 +112,7 @@ export const approveApplication = authActionClient
export const rejectApplication = authActionClient
.inputSchema(RejectApplicationSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createMemberManagementApi(client);
@@ -297,7 +297,7 @@ export const generateMemberCards = authActionClient
)
.action(async ({ parsedInput: input }) => {
const client = getSupabaseServerClient();
const api = createMemberManagementApi(client);
const _api = createMemberManagementApi(client);
let query = client
.from('members')
@@ -342,7 +342,7 @@ export const inviteMemberToPortal = authActionClient
email: z.string().email(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createMemberManagementApi(client);

View File

@@ -9,13 +9,12 @@ import { getSupabaseServerClient } from '@kit/supabase/server-client';
import {
CreateNewsletterSchema,
UpdateNewsletterSchema,
CreateTemplateSchema,
} from '../../schema/newsletter.schema';
import { createNewsletterApi } from '../api';
export const createNewsletter = authActionClient
.inputSchema(CreateNewsletterSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createNewsletterApi(client);
@@ -29,7 +28,7 @@ export const createNewsletter = authActionClient
export const updateNewsletter = authActionClient
.inputSchema(UpdateNewsletterSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createNewsletterApi(client);
@@ -51,7 +50,7 @@ export const createTemplate = authActionClient
variables: z.array(z.string()).optional(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createNewsletterApi(client);
@@ -74,7 +73,7 @@ export const addRecipients = authActionClient
.optional(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createNewsletterApi(client);
@@ -95,7 +94,7 @@ export const dispatchNewsletter = authActionClient
newsletterId: z.string().uuid(),
}),
)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const logger = await getLogger();
const api = createNewsletterApi(client);

View File

@@ -25,7 +25,7 @@ function substituteVariables(
}
export function createNewsletterApi(client: SupabaseClient<Database>) {
const db = client;
const _db = client;
return {
// --- Templates ---
@@ -254,7 +254,7 @@ export function createNewsletterApi(client: SupabaseClient<Database>) {
for (const recipient of pending) {
try {
// Substitute variables in the body
const personalizedHtml = substituteVariables(newsletter.body_html, {
const _personalizedHtml = substituteVariables(newsletter.body_html, {
first_name: (recipient.name ?? '').split(' ')[0] ?? '',
name: recipient.name ?? '',
email: recipient.email ?? '',

View File

@@ -72,7 +72,7 @@ export function PortalLoginForm({ slug, accountName }: Props) {
router.push(`/club/${slug}/portal/profile`);
router.refresh();
}
} catch (err) {
} catch (_err) {
setError('Verbindungsfehler. Bitte versuchen Sie es erneut.');
} finally {
setLoading(false);

View File

@@ -14,7 +14,7 @@ interface Props {
initialData: Record<string, unknown>;
}
export function SiteEditor({ pageId, accountId, initialData }: Props) {
export function SiteEditor({ pageId, accountId: _accountId, initialData }: Props) {
const { execute: execPublish } = useActionWithToast(publishPage, {
successMessage: 'Seite veröffentlicht',
});

View File

@@ -123,7 +123,7 @@ const ContactFormBlock = ({
const MapBlock = ({
latitude,
longitude,
zoom,
zoom: _zoom,
height,
}: {
latitude: number;

View File

@@ -3,7 +3,6 @@
import { z } from 'zod';
import { authActionClient } from '@kit/next/safe-action';
import { getLogger } from '@kit/shared/logger';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import {
@@ -12,13 +11,12 @@ import {
SiteSettingsSchema,
CreatePostSchema,
UpdatePostSchema,
NewsletterSubscribeSchema,
} from '../../schema/site.schema';
import { createSiteBuilderApi } from '../api';
export const createPage = authActionClient
.inputSchema(CreatePageSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const api = createSiteBuilderApi(client);
const data = await api.createPage(input, ctx.user.id);
@@ -27,7 +25,7 @@ export const createPage = authActionClient
export const saveDraft = authActionClient
.inputSchema(UpdatePageSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const api = createSiteBuilderApi(client);
const data = await api.updatePage(
@@ -40,7 +38,7 @@ export const saveDraft = authActionClient
export const publishPage = authActionClient
.inputSchema(UpdatePageSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const api = createSiteBuilderApi(client);
const data = await api.updatePage(
@@ -71,7 +69,7 @@ export const updateSiteSettings = authActionClient
export const createPost = authActionClient
.inputSchema(CreatePostSchema)
.action(async ({ parsedInput: input, ctx }) => {
.action(async ({ parsedInput: input, ctx: _ctx }) => {
const client = getSupabaseServerClient();
const api = createSiteBuilderApi(client);
const data = await api.createPost(input, ctx.user.id);

View File

@@ -43,10 +43,10 @@ const STATUS_TRANSITIONS: Record<string, MeetingItemStatus> = {
export function ProtocolItemsList({
items,
protocolId,
account,
protocolId: _protocolId,
account: _account,
}: ProtocolItemsListProps) {
const { execute: executeStatusUpdate, isPending: isUpdating } = useAction(
const { execute: executeStatusUpdate, isPending: _isUpdating } = useAction(
updateItemStatus,
{
onSuccess: ({ data }) => {

View File

@@ -150,7 +150,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
return data ?? [];
},
async createItem(input: CreateProtocolItemInput, userId: string) {
async createItem(input: CreateProtocolItemInput, _userId: string) {
const { data, error } = await client
.from('meeting_protocol_items')
.insert({
@@ -168,7 +168,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
return data;
},
async updateItem(input: UpdateProtocolItemInput, userId: string) {
async updateItem(input: UpdateProtocolItemInput, _userId: string) {
const updateData: Record<string, unknown> = {};
if (input.title !== undefined) updateData.title = input.title;
@@ -191,7 +191,7 @@ export function createMeetingsApi(client: SupabaseClient<Database>) {
return data;
},
async updateItemStatus(input: UpdateItemStatusInput, userId: string) {
async updateItemStatus(input: UpdateItemStatusInput, _userId: string) {
const { data, error } = await client
.from('meeting_protocol_items')
.update({

View File

@@ -29,7 +29,7 @@ interface ClubFeeBillingTableProps {
export function ClubFeeBillingTable({
billings,
clubId,
clubId: _clubId,
}: ClubFeeBillingTableProps) {
const [showPaid, setShowPaid] = useState(false);

View File

@@ -33,7 +33,7 @@ const NOTE_ICONS: Record<string, React.ReactNode> = {
erinnerung: <Bell className="h-4 w-4" />,
};
export function ClubNotesList({ notes, clubId }: ClubNotesListProps) {
export function ClubNotesList({ notes, clubId: _clubId }: ClubNotesListProps) {
const { execute: executeComplete } = useAction(completeClubNote, {
onSuccess: () => {
toast.success('Aufgabe erledigt');