Skip to content

Commit 12f6ef0

Browse files
committed
Merge branch 'main' of github.com:boundlessfi/boundless
2 parents 4e2c01e + 1f2cb91 commit 12f6ef0

3 files changed

Lines changed: 19 additions & 5 deletions

File tree

components/organization/hackathons/new/tabs/ParticipantTab.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,8 @@ export default function ParticipantTab({
300300
/>
301301

302302
{/* Team Size Settings */}
303-
{participantType === 'team' && (
303+
{(participantType === 'team' ||
304+
participantType === 'team_or_individual') && (
304305
<div className='rounded-lg border border-zinc-800 bg-zinc-900/30 p-6'>
305306
<h4 className='mb-1 text-sm font-medium text-white'>Team Size</h4>
306307
<p className='mb-4 text-sm text-zinc-500'>

components/organization/hackathons/new/tabs/components/timeline/DateTimeInput.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ interface DateTimeInputProps {
2525

2626
const formatTimeValue = (date?: Date): string => {
2727
if (!date) return '';
28-
const hours = `${date.getHours()}`.padStart(2, '0');
29-
const minutes = `${date.getMinutes()}`.padStart(2, '0');
30-
const seconds = `${date.getSeconds()}`.padStart(2, '0');
28+
const hours = String(date.getHours()).padStart(2, '0');
29+
const minutes = String(date.getMinutes()).padStart(2, '0');
30+
const seconds = String(date.getSeconds()).padStart(2, '0');
3131
return `${hours}:${minutes}:${seconds}`;
3232
};
3333

@@ -100,7 +100,7 @@ export default function DateTimeInput({
100100
<Input
101101
type='time'
102102
step='1'
103-
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'
103+
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'
104104
value={formatTimeValue(field.value)}
105105
onChange={event => {
106106
const timeValue = event.target.value;

components/organization/hackathons/new/tabs/schemas/participantSchema.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,19 @@ export const participantSchema = z
5252
});
5353
}
5454
}
55+
56+
// New validation: At least one submission requirement must be selected
57+
if (
58+
!data.require_github &&
59+
!data.require_demo_video &&
60+
!data.require_other_links
61+
) {
62+
ctx.addIssue({
63+
code: z.ZodIssueCode.custom,
64+
message: 'At least one submission requirement must be selected',
65+
path: ['require_github'],
66+
});
67+
}
5568
});
5669

5770
export type ParticipantFormData = z.input<typeof participantSchema>;

0 commit comments

Comments
 (0)