Added support for challenges and tweaked qual awarding rules
This commit is contained in:
@@ -11,6 +11,7 @@ export const courseEventAttendeeSchema = z.object({
|
||||
export const trainingReportSchema = z.object({
|
||||
id: z.number().int().positive().optional(),
|
||||
course_id: z.number({ invalid_type_error: "Must select a training" }).int(),
|
||||
is_challenge: z.boolean().default(false),
|
||||
event_date: z
|
||||
.string()
|
||||
.refine(
|
||||
|
||||
@@ -18,6 +18,7 @@ export interface CourseEventDetails {
|
||||
course_id: number | null; // FK → courses.id
|
||||
event_type: number | null; // FK → event_types.id
|
||||
event_date: Date; // datetime (not nullable)
|
||||
is_challenge?: boolean;
|
||||
|
||||
guilded_event_id: number | null;
|
||||
|
||||
@@ -88,4 +89,5 @@ export interface CourseEventSummary {
|
||||
date: string;
|
||||
created_by: number;
|
||||
created_by_name: string;
|
||||
is_challenge?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user