14
14
</div >
15
15
</div >
16
16
17
- You do not have a team yet.
17
+ < p > You do not have a team yet.</ p >
18
18
19
19
<button
20
20
v-if =" canSubmit"
41
41
v-if =" editingTeam"
42
42
v-model =" tempTeam!.teamName"
43
43
class =" p box-border border-[1px] border-black bg-white text-3xl font-semibold text-black" ></ICInput >
44
+
45
+ <p class =" text-3xl font-semibold text-black" >Team #{{ team!.id }}</p >
46
+
44
47
<button v-if =" !editingTeam" title =" Edit team name" >
45
48
<img
46
49
src =" @ui25/assets/edit.svg"
71
74
<ICTeamMember
72
75
class =" max-w-80"
73
76
v-for =" (member, i) in team!.members"
77
+ :editing =" editingTeam"
74
78
:name =" member.name"
75
79
:color =" colors[i % 3]!"
76
- :leader =" member.leader" />
80
+ :leader =" member.leader"
81
+ @cross =" handleRemoveTeammate(member.id)" />
77
82
</div >
78
83
</div >
79
84
80
- <h2 class =" text-2xl font-semibold" >Pending Invites</h2 >
85
+ <h2 class =" text-2xl font-semibold" v-if =" team!.invited.length > 0" >
86
+ Pending Invites
87
+ </h2 >
81
88
<div class =" flex flex-wrap gap-2" v-if =" team!.invited.length > 0" >
82
89
<ICTeamMember
83
90
class =" w-fit"
115
122
116
123
<div class =" space-y-6" >
117
124
<div >
118
- <h3 >Phone Number:</h3 >
125
+ <h3 >Phone Number (UK number preferred) :</h3 >
119
126
<ICInput
120
127
v-if =" !editingTeam"
121
128
:frozen =" true"
122
129
v-model =" team!.phone"
123
- placeholder =" Please input your phone number ." />
130
+ placeholder =" +44.. ." />
124
131
<ICInput v-else v-model =" tempTeam.phone" placeholder =" +44..." />
125
132
</div >
126
133
129
136
<ICInput
130
137
v-if =" !editingTeam"
131
138
:frozen =" true"
132
- placeholder =" Input your backup phone number ."
139
+ placeholder =" +44.. ."
133
140
v-model =" team!.phone2" />
134
141
<ICInput v-else v-model =" tempTeam.phone2" placeholder =" +44..." />
135
142
</div >
136
143
144
+ <div class =" max-w-fit" >
145
+ <h3 >Hackspace:</h3 >
146
+ <ICInputSelect
147
+ name =" hackspace"
148
+ v-if =" !editingTeam"
149
+ :frozen =" true"
150
+ placeholder =" Hackspace"
151
+ :options =" hackspaceOptions"
152
+ v-model =" team!.hackspace" />
153
+ <ICInputSelect
154
+ v-else
155
+ name =" hackspaceTmp"
156
+ placeholder =" Hackspace"
157
+ :options =" hackspaceOptions"
158
+ v-model =" tempTeam.hackspace" />
159
+ </div >
160
+
137
161
<div >
138
- <h3 >Submission Link :</h3 >
162
+ <h3 >Table number :</h3 >
139
163
<ICInput
140
164
v-if =" !editingTeam"
141
165
:frozen =" true"
142
- placeholder =" https://devpost.com/..."
166
+ v-model =" team!.tableNumber" />
167
+ <ICInput v-else v-model =" tempTeam.tableNumber" />
168
+ </div >
169
+
170
+ <div >
171
+ <h3 >
172
+ <a
173
+ href =" https://ic-hack-25.devpost.com/"
174
+ target =" _blank"
175
+ class =" underline"
176
+ >Submission Link:</a
177
+ >
178
+ </h3 >
179
+ <ICInput
180
+ v-if =" !editingTeam"
181
+ :frozen =" true"
182
+ placeholder =" https://ic-hack-25.devpost.com/..."
143
183
v-model =" team!.submissionLink" />
144
184
<ICInput
145
185
v-else
146
186
v-model =" tempTeam.submissionLink"
147
- placeholder =" https://devpost.com/..."
187
+ placeholder =" https://ic-hack-25. devpost.com/..."
148
188
pattern =" urlRegex" />
149
189
</div >
150
190
185
225
placeholder =" Please select a category"
186
226
:options =" mapCategories(sponsor_categories)" />
187
227
</div >
228
+
229
+ <div >
230
+ <ICInputCheckbox
231
+ :fixed =" !editingTeam"
232
+ title =" Have you used Intersystems IRIS Vector Search in your project?"
233
+ description =" Tick yes to enter for Intersystems' challenge."
234
+ name =" terms"
235
+ v-model =" tempTeam.intersystems" />
236
+ </div >
237
+
238
+ <div >
239
+ <h3
240
+ v-if =" !editingTeam"
241
+ :class =" [
242
+ 'text-xl font-bold',
243
+ missingRequirements.length > 0
244
+ ? 'text-red-ic'
245
+ : 'text-green-400'
246
+ ]" >
247
+ You have {{ missingRequirements.length > 0 ? 'not' : '' }} met
248
+ all the requirements to submit.
249
+ </h3 >
250
+ <ul v-if =" missingRequirements.length > 0 && !editingTeam" >
251
+ Your team will not be submitted for judging. You are missing:
252
+ <li
253
+ v-for =" req in missingRequirements"
254
+ :key =" req"
255
+ class =" ml-8 list-disc" >
256
+ {{ req }}
257
+ </li >
258
+ </ul >
259
+ <p v-else >
260
+ Your team will automatically be submitted for judging at the
261
+ deadline.
262
+ </p >
263
+ </div >
188
264
</div >
189
265
</div >
190
266
</div >
@@ -208,7 +284,7 @@ import TeamInvite from '~~/packages/ui25/components/IC/TeamInvite.vue';
208
284
209
285
const colors = [' bg-red-ic' , ' bg-blue-ic' , ' bg-yellow-ic' ];
210
286
211
- definePageMeta ({ middleware: ' require-auth' });
287
+ definePageMeta ({ middleware: [ ' require-auth' , ' require-link ' ] });
212
288
213
289
const { data : canSubmit } = await useAsyncData (' can_submit' , async () => {
214
290
const { getMetaDataInfo } = useAdmin ();
@@ -224,6 +300,12 @@ const mapCategories = (values: readonly Category[]) =>
224
300
};
225
301
});
226
302
303
+ const hackspaceOptions = [
304
+ { displayName: " Queen's Tower Room" , value: ' qtr' },
305
+ { displayName: ' Senior Common Room' , value: ' scr' },
306
+ { displayName: ' Junior Common Room' , value: ' jcr' }
307
+ ];
308
+
227
309
const {
228
310
getOwnTeam,
229
311
getTeamInvites,
@@ -239,16 +321,25 @@ const {
239
321
disbandTeam
240
322
} = useTeams ();
241
323
242
- const urlRegex =
243
- / https? :\/\/ (www\. )? [-a-zA-Z0-9 @:%. _\+ ~#=] {1,256} \. [a-zA-Z0-9 ()] {1,6} \b ([-a-zA-Z0-9 ()@:%_\+ . ~#?&//=] * )/ ;
244
-
324
+ const urlRegex = / https:\/\/ ic-hack-25. devpost. com\/ . + / ;
245
325
const store = useProfileStore ();
246
326
const profile = store .profile ! ;
247
327
248
328
const errorMessage = ref (' ' );
329
+ const missingRequirements = computed (() => {
330
+ const reqs = [];
331
+
332
+ if (! tempTeam .phone ) reqs .push (' phone number' );
333
+ if (! tempTeam .hackspace ) reqs .push (' hackspace' );
334
+ if (! tempTeam .tableNumber ) reqs .push (' table number' );
335
+ if (! tempTeam .submissionLink ) reqs .push (' submission link' );
336
+ if (! tempTeam .docsocCategory ) reqs .push (' DoCSoc category' );
337
+ if (! tempTeam .sponsorCategory ) reqs .push (' sponsor category' );
338
+
339
+ return reqs ;
340
+ });
249
341
250
342
const editingTeam = ref (false );
251
- const isInvitingTeam = ref (false );
252
343
const maxTeammates = computed (
253
344
() =>
254
345
(team .value ?.members .length ?? 0 ) + (team .value ?.members .length ?? 0 ) >= 6
@@ -276,8 +367,6 @@ const submissionOutline = computed(() =>
276
367
: ' outline-red-700'
277
368
);
278
369
279
- const searchPerson = ref (' ' );
280
-
281
370
// TODO: Should this be fetched from some api route?
282
371
const editable = ref (true );
283
372
@@ -300,8 +389,6 @@ const docsoc_categories =
300
389
const sponsor_categories =
301
390
all_categories .value ?.filter (c => c ?.owner != ' DoCSoc' ) ?? [];
302
391
303
- const profileColours = [' bg-red-ic' , ' bg-blue-ic' , ' bg-yellow-ic' ];
304
-
305
392
const {
306
393
data : team,
307
394
refresh : reloadTeam,
@@ -344,7 +431,10 @@ const tempTeam = reactive({
344
431
sponsorCategory: team .value ?.sponsorCategory ?? undefined ,
345
432
submissionLink: team .value ?.submissionLink ?? undefined ,
346
433
phone: team .value ?.phone ?? undefined ,
347
- phone2: team .value ?.phone2 ?? undefined
434
+ phone2: team .value ?.phone2 ?? undefined ,
435
+ intersystems: team .value ?.intersystems ?? undefined ,
436
+ tableNumber: team .value ?.tableNumber ?? undefined ,
437
+ hackspace: team .value ?.hackspace ?? undefined
348
438
});
349
439
350
440
async function handleCreateTeam() {
@@ -414,28 +504,27 @@ async function handleConfirmTeamName() {
414
504
if (tempTeam .submissionLink == ' ' ) tempTeam .submissionLink = undefined ;
415
505
416
506
if (! phoneRegex .test (tempTeam .phone ?? ' ' )) {
417
- console .log (' L bozo' );
418
507
errorMessage .value =
419
508
" Please ensure you've provided a phone number, with the country code." ;
420
509
return ;
421
510
}
422
511
if (tempTeam .phone2 && ! phoneRegex .test (tempTeam .phone2 )) {
423
- console .log (' L bozo 2' );
424
512
errorMessage .value =
425
513
" Please ensure the backup phone number you've provided is correct, with the country code." ;
426
514
return ;
427
515
}
428
- if (tempTeam .submissionLink && ! urlRegex .test (tempTeam .submissionLink )) {
429
- console .log (' L bozo 3' );
430
- errorMessage .value = ' Please ensure your submission link is a proper URL.' ;
516
+ if (
517
+ tempTeam .submissionLink &&
518
+ ! tempTeam .submissionLink .includes (' ic-hack-25.devpost.com' )
519
+ ) {
520
+ errorMessage .value =
521
+ ' Please ensure your submission link is a proper Devpost URL. It should contain "ic-hack-25.devpost.com".' ;
431
522
return ;
432
523
}
433
524
434
525
editingTeam .value = false ;
435
526
inviteFilter .value = ' ' ;
436
527
437
- console .log (' W bozo' );
438
-
439
528
// Only make the request if something has changed.
440
529
const noChanges = Object .keys (tempTeam ).every (elem => {
441
530
return (
@@ -467,7 +556,9 @@ function handleCancelTeamName() {
467
556
sponsorCategory: team .value ?.sponsorCategory ?? undefined ,
468
557
submissionLink: team .value ?.submissionLink ?? undefined ,
469
558
phone: team .value ?.phone ?? undefined ,
470
- phone2: team .value ?.phone2 ?? undefined
559
+ phone2: team .value ?.phone2 ?? undefined ,
560
+ intersystems: team .value ?.intersystems ?? undefined ,
561
+ tableNumber: team .value ?.tableNumber ?? undefined
471
562
});
472
563
}
473
564
@@ -493,10 +584,6 @@ async function handleCancelInvite(teammate: string) {
493
584
alert (" apparently we don't have a way to do this" );
494
585
}
495
586
496
- async function startInviting() {
497
- isInvitingTeam .value = true ;
498
- }
499
-
500
587
async function handleInvite(userId : string ) {
501
588
const req = await inviteTeammate (userId );
502
589
0 commit comments