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