coupon code system eingeführt. coupons werden vom super admin gemanaged. coupons werden mit paddle synchronisiert und dort validiert. plus: einige mobil-optimierungen im tenant admin pwa.

This commit is contained in:
Codex Agent
2025-11-09 20:26:50 +01:00
parent f3c44be76d
commit 082b78cd43
80 changed files with 4855 additions and 435 deletions

View File

@@ -246,6 +246,8 @@ export type TenantTask = {
difficulty: 'easy' | 'medium' | 'hard' | null;
due_date: string | null;
is_completed: boolean;
event_type_id: number | null;
event_type?: TenantEventType | null;
tenant_id: number | null;
collection_id: number | null;
source_task_id: number | null;
@@ -693,6 +695,11 @@ function normalizeTask(task: JsonValue): TenantTask {
const titleTranslations = normalizeTranslationMap(task.title_translations ?? task.title ?? {});
const descriptionTranslations = normalizeTranslationMap(task.description_translations ?? task.description ?? {});
const exampleTranslations = normalizeTranslationMap(task.example_text ?? {});
const eventType = normalizeEventType(task.event_type ?? task.eventType ?? null);
const eventTypeId =
typeof task.event_type_id === 'number'
? Number(task.event_type_id)
: eventType?.id ?? null;
return {
id: Number(task.id ?? 0),
@@ -709,6 +716,8 @@ function normalizeTask(task: JsonValue): TenantTask {
difficulty: (task.difficulty ?? null) as TenantTask['difficulty'],
due_date: task.due_date ?? null,
is_completed: Boolean(task.is_completed ?? false),
event_type_id: eventTypeId,
event_type: eventType,
tenant_id: task.tenant_id ?? null,
collection_id: task.collection_id ?? null,
source_task_id: task.source_task_id ?? null,