Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ export default function ParticipantTab({
/>

{/* Team Size Settings */}
{participantType === 'team' && (
{(participantType === 'team' ||
participantType === 'team_or_individual') && (
<div className='rounded-lg border border-zinc-800 bg-zinc-900/30 p-6'>
<h4 className='mb-1 text-sm font-medium text-white'>Team Size</h4>
<p className='mb-4 text-sm text-zinc-500'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}`;
};

Expand Down Expand Up @@ -100,7 +100,7 @@ export default function DateTimeInput({
<Input
type='time'
step='1'
className='bg-background-card h-12 w-32 shrink-0 appearance-none rounded-[12px] border border-gray-900 px-4 text-sm text-white [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none'
className='bg-background-card selection:bg-primary/30 h-12 w-40 shrink-0 rounded-[12px] border border-gray-900 px-4 text-sm text-white [&::-webkit-calendar-picker-indicator]:hidden'
value={formatTimeValue(field.value)}
onChange={event => {
const timeValue = event.target.value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof participantSchema>;
Loading