fix: QA audit — lint cleanup, i18n fixes, module visibility, sidebar UX
- 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:
@@ -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++;
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 ---
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 ---
|
||||
|
||||
@@ -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>;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 ---
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -29,7 +29,7 @@ interface ApplicationWorkflowProps {
|
||||
export function ApplicationWorkflow({
|
||||
applications,
|
||||
accountId,
|
||||
account,
|
||||
account: _account,
|
||||
}: ApplicationWorkflowProps) {
|
||||
const router = useRouter();
|
||||
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -44,7 +44,7 @@ export function MembersDataTable({
|
||||
pageSize,
|
||||
account,
|
||||
accountId,
|
||||
duesCategories,
|
||||
duesCategories: _duesCategories,
|
||||
}: MembersDataTableProps) {
|
||||
const router = useRouter();
|
||||
const searchParams = useSearchParams();
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 ?? '',
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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',
|
||||
});
|
||||
|
||||
@@ -123,7 +123,7 @@ const ContactFormBlock = ({
|
||||
const MapBlock = ({
|
||||
latitude,
|
||||
longitude,
|
||||
zoom,
|
||||
zoom: _zoom,
|
||||
height,
|
||||
}: {
|
||||
latitude: number;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 }) => {
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -29,7 +29,7 @@ interface ClubFeeBillingTableProps {
|
||||
|
||||
export function ClubFeeBillingTable({
|
||||
billings,
|
||||
clubId,
|
||||
clubId: _clubId,
|
||||
}: ClubFeeBillingTableProps) {
|
||||
const [showPaid, setShowPaid] = useState(false);
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user