feat: add update and delete functionality for courses, events, and species; enhance attendance tracking and category creation
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 4m53s
Workflow / ⚫️ Test (push) Has been skipped

This commit is contained in:
T. Zehetbauer
2026-04-01 16:03:50 +02:00
parent 7b078f298b
commit c6b2824da8
48 changed files with 2036 additions and 390 deletions

View File

@@ -33,19 +33,7 @@ export const createRecord = authActionClient
}
// Validate data against field definitions
const fields = (
moduleWithFields as unknown as {
fields: Array<{
name: string;
field_type: string;
is_required: boolean;
min_value?: number | null;
max_value?: number | null;
max_length?: number | null;
regex_pattern?: string | null;
}>;
}
).fields;
const { fields } = moduleWithFields;
const validation = validateRecordData(
input.data as Record<string, unknown>,
fields as Parameters<typeof validateRecordData>[1],
@@ -98,19 +86,7 @@ export const updateRecord = authActionClient
throw new Error('Module not found');
}
const fields = (
moduleWithFields as unknown as {
fields: Array<{
name: string;
field_type: string;
is_required: boolean;
min_value?: number | null;
max_value?: number | null;
max_length?: number | null;
regex_pattern?: string | null;
}>;
}
).fields;
const { fields } = moduleWithFields;
const validation = validateRecordData(
input.data as Record<string, unknown>,
fields as Parameters<typeof validateRecordData>[1],