diff --git a/components/organization/hackathons/new/tabs/ParticipantTab.tsx b/components/organization/hackathons/new/tabs/ParticipantTab.tsx index 730d227ce..5a149547a 100644 --- a/components/organization/hackathons/new/tabs/ParticipantTab.tsx +++ b/components/organization/hackathons/new/tabs/ParticipantTab.tsx @@ -300,7 +300,8 @@ export default function ParticipantTab({ /> {/* Team Size Settings */} - {participantType === 'team' && ( + {(participantType === 'team' || + participantType === 'team_or_individual') && (
diff --git a/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx b/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx
index 9f592e5f0..5dbe3b707 100644
--- a/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx
+++ b/components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx
@@ -25,9 +25,9 @@ interface DateTimeInputProps {
const formatTimeValue = (date?: Date): string => {
if (!date) return '';
- const hours = `${date.getHours()}`.padStart(2, '0');
- const minutes = `${date.getMinutes()}`.padStart(2, '0');
- const seconds = `${date.getSeconds()}`.padStart(2, '0');
+ const hours = String(date.getHours()).padStart(2, '0');
+ const minutes = String(date.getMinutes()).padStart(2, '0');
+ const seconds = String(date.getSeconds()).padStart(2, '0');
return `${hours}:${minutes}:${seconds}`;
};
@@ -100,7 +100,7 @@ export default function DateTimeInput({
{
const timeValue = event.target.value;
diff --git a/components/organization/hackathons/new/tabs/schemas/participantSchema.ts b/components/organization/hackathons/new/tabs/schemas/participantSchema.ts
index a3df10165..5b6c558f6 100644
--- a/components/organization/hackathons/new/tabs/schemas/participantSchema.ts
+++ b/components/organization/hackathons/new/tabs/schemas/participantSchema.ts
@@ -52,6 +52,19 @@ export const participantSchema = z
});
}
}
+
+ // New validation: At least one submission requirement must be selected
+ if (
+ !data.require_github &&
+ !data.require_demo_video &&
+ !data.require_other_links
+ ) {
+ ctx.addIssue({
+ code: z.ZodIssueCode.custom,
+ message: 'At least one submission requirement must be selected',
+ path: ['require_github'],
+ });
+ }
});
export type ParticipantFormData = z.input