File tree Expand file tree Collapse file tree
components/organization/hackathons/new/tabs Expand file tree Collapse file tree Original file line number Diff line number Diff 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' >
Original file line number Diff line number Diff line change @@ -25,9 +25,9 @@ interface DateTimeInputProps {
2525
2626const 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 ;
Original file line number Diff line number Diff 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
5770export type ParticipantFormData = z . input < typeof participantSchema > ;
You can’t perform that action at this time.
0 commit comments