From dd94b895b50b69a15769bec432dea9d0f7dd27ea Mon Sep 17 00:00:00 2001 From: Cedric Rische Date: Mon, 12 Jan 2026 22:19:21 +0100 Subject: [PATCH 1/3] Enables registration and adds Travel Stipend option to the form --- src/app/page.tsx | 2 +- src/components/Registration/Registration.jsx | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/app/page.tsx b/src/app/page.tsx index 618ef93..dbaeed0 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -22,7 +22,7 @@ export default function Page() { - {/* */} + {/* */} diff --git a/src/components/Registration/Registration.jsx b/src/components/Registration/Registration.jsx index e09f0a3..d30d9d1 100644 --- a/src/components/Registration/Registration.jsx +++ b/src/components/Registration/Registration.jsx @@ -34,7 +34,7 @@ import { GroupManager } from "./GroupManager/GroupManager"; // types: 0 = empty, // types: 0 = empty, 1 = textfield, 2 = date, 3 = select, 4 = radio -const registrationClosed = true; +const registrationClosed = false; const personalData = [ { formLabel: "First name", @@ -219,6 +219,16 @@ const legal = [ required: false, fullWidth: true, }, + { + formLabel: "Apply for Travel Stipend", + input: [ + "I agree that my contact and job-related data will be passed to our partner Quantco. Quantco will reach out to you, if you will be selected. Stipend applies worldwide.", + ], + name: "travelStipend", + type: 5, + required: false, + fullWidth: true, + }, { input: [ "Film and sound recordings as well as photos will be made at the event, and you agree to their subsequent use by attending the event.", From 55aa66c069c9576ceb620d1c8a86c2f278e37f9b Mon Sep 17 00:00:00 2001 From: Cedric Rische Date: Fri, 23 Jan 2026 09:01:53 +0100 Subject: [PATCH 2/3] Add Travel Scholarship section to registration form and enhance group creation functionality --- .../GroupManager/GroupManager.jsx | 63 +++++++++++++------ src/components/Registration/Registration.jsx | 37 +++++++---- src/rest/GroupRest.js | 4 +- 3 files changed, 72 insertions(+), 32 deletions(-) diff --git a/src/components/Registration/GroupManager/GroupManager.jsx b/src/components/Registration/GroupManager/GroupManager.jsx index 0bcd7b4..b0346d3 100644 --- a/src/components/Registration/GroupManager/GroupManager.jsx +++ b/src/components/Registration/GroupManager/GroupManager.jsx @@ -8,7 +8,7 @@ import { Typography, } from "@mui/material"; import { LoadingButton } from "@mui/lab"; -import {useEffect, useMemo, useState} from "react"; +import { useEffect, useMemo, useState } from "react"; import { GroupRest } from "../../../rest/GroupRest"; export function GroupManager(props) { @@ -17,21 +17,27 @@ export function GroupManager(props) { const [group, setGroup] = useState(false); const [groupInput, setGroupInput] = useState(""); const [groupInputError, setGroupInputError] = useState(false); + const [groupName, setGroupName] = useState(""); const groupRest = useMemo(() => new GroupRest(), []); - function createNewGroup() { setLoadingNewTeam(true); - setGroupInputError(false) - groupRest.createGroup(props.eventId).then((response) => { - setLoadingNewTeam(false); - setGroup(response.data); - }); + setGroupInputError(false); + groupRest + .createGroup(props.eventId) + .then((response) => { + setLoadingNewTeam(false); + setGroup(response.data); + }) + .catch((err) => { + console.error(err); + setLoadingNewTeam(false); + }); } function getGroup() { setFetchingExistingTeam(true); - setGroupInputError(false) + setGroupInputError(false); groupRest .getGroup(props.eventId, groupInput) .then((response) => { @@ -45,9 +51,9 @@ export function GroupManager(props) { }); } - useEffect(() => { - props.onGroupChange(group) - }, [group]); + useEffect(() => { + props.onGroupChange(group); + }, [group]); function renderGroupSelection() { return ( @@ -55,7 +61,7 @@ export function GroupManager(props) { setGroupInput(event.target.value)} error={groupInputError} @@ -72,18 +78,37 @@ export function GroupManager(props) { Join + + Identifier given by the group creator + or - + + setGroupName(event.target.value)} + disabled={fetchingExistingTeam} + /> 30 + } > - Create new Team + Create - + + + This will be your team name at the event + ); } @@ -91,7 +116,9 @@ export function GroupManager(props) { function renderGroup() { return ( - You are assigned to the group + + You are assigned to the group with identifier + {group.phrase} @@ -100,7 +127,7 @@ export function GroupManager(props) { - share this name to your team members + share this identifier to your team members This is not your actual team name at the event diff --git a/src/components/Registration/Registration.jsx b/src/components/Registration/Registration.jsx index c47d798..a75506e 100644 --- a/src/components/Registration/Registration.jsx +++ b/src/components/Registration/Registration.jsx @@ -199,6 +199,25 @@ const skills = [ }, ]; +const travelSponsorship = [ + { + fullWidth: true, + input: + "Quantco, our partner, is offering travel scholarships to participants worldwide. To apply, simply submit your CV using the checkbox below.", + type: INPUT_TYPES.TYPOGRAPHY, + }, + { + formLabel: "", + input: [ + "I consent to sharing my contact information and CV with our partner, Quantco, and authorize them to contact me.", + ], + name: "travelStipend", + type: INPUT_TYPES.CHECKBOX, + required: false, + fullWidth: true, + }, +]; + const legal = [ { formLabel: "Privacy Policy", @@ -218,16 +237,6 @@ const legal = [ required: false, fullWidth: true, }, - { - formLabel: "Apply for Travel Stipend", - input: [ - "I agree that my contact and job-related data will be passed to our partner Quantco. Quantco will reach out to you, if you will be selected. Stipend applies worldwide.", - ], - name: "travelStipend", - type: 5, - required: false, - fullWidth: true, - }, { input: [ "Film and sound recordings as well as photos will be made at the event, and you agree to their subsequent use by attending the event.", @@ -262,11 +271,15 @@ function Registration() { label: "Team members", children: ( handleChange("group", change)} /> ), }, + { + label: "Travel Scholarship", + content: travelSponsorship, + }, { label: "Confirmation", content: legal, @@ -439,7 +452,7 @@ function Registration() { /> ); case INPUT_TYPES.TYPOGRAPHY: - return {input}; + return {input}; default: return null; diff --git a/src/rest/GroupRest.js b/src/rest/GroupRest.js index 02b8c55..9a52f9a 100644 --- a/src/rest/GroupRest.js +++ b/src/rest/GroupRest.js @@ -2,8 +2,8 @@ import axios from "axios"; import { AbstractRest } from "./AbstractRest"; export class GroupRest extends AbstractRest { - createGroup(signUpFormId) { - return axios.post(this.baseUrl + "/group", { event: { id: signUpFormId } }); + createGroup(signUpFormId, name) { + return axios.post(this.baseUrl + "/group", { event: { id: signUpFormId }, name }); } getGroup(eventId, groupName) { From 89c6a134d6f30ecf661d7935b044f59fb9da999b Mon Sep 17 00:00:00 2001 From: Cedric Rische Date: Sat, 24 Jan 2026 01:20:45 +0100 Subject: [PATCH 3/3] Updated email regex validation, added scholarship email instructions, improved group creation, and updated form ID --- .../Registration/GroupManager/GroupManager.jsx | 2 +- src/components/Registration/Registration.jsx | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/components/Registration/GroupManager/GroupManager.jsx b/src/components/Registration/GroupManager/GroupManager.jsx index b0346d3..00b8dd5 100644 --- a/src/components/Registration/GroupManager/GroupManager.jsx +++ b/src/components/Registration/GroupManager/GroupManager.jsx @@ -24,7 +24,7 @@ export function GroupManager(props) { setLoadingNewTeam(true); setGroupInputError(false); groupRest - .createGroup(props.eventId) + .createGroup(props.eventId, groupName) .then((response) => { setLoadingNewTeam(false); setGroup(response.data); diff --git a/src/components/Registration/Registration.jsx b/src/components/Registration/Registration.jsx index a75506e..b7cd28d 100644 --- a/src/components/Registration/Registration.jsx +++ b/src/components/Registration/Registration.jsx @@ -71,7 +71,8 @@ const personalData = [ type: INPUT_TYPES.TEXT_FIELD, input: ["example@example.com"], name: "email", - regex: /^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/, + regex: + /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/, required: true, }, { @@ -203,7 +204,13 @@ const travelSponsorship = [ { fullWidth: true, input: - "Quantco, our partner, is offering travel scholarships to participants worldwide. To apply, simply submit your CV using the checkbox below.", + "Our partner, Quantco, provides travel scholarships for participants from around the globe. Applying is easy — just submit your CV and select the checkbox below.", + type: INPUT_TYPES.TYPOGRAPHY, + }, + { + fullWidth: true, + input: + "Please email your CV in PDF format to travel-scholarship@hackhpi.org.", type: INPUT_TYPES.TYPOGRAPHY, }, { @@ -337,6 +344,11 @@ function Registration() { ) { return previous && false; } + + if (current.regex && !values[current.name].match(current.regex)){ + return previous && false; + } + const meetsMax = current.max ? values[current.name]?.length <= current.max : true; @@ -484,7 +496,7 @@ function Registration() { email: values.email, fieldData: JSON.stringify(values), signUpForm: { - id: "283db119-046c-4418-939d-ab9bee06c996", + id: "e73735ad-c930-44ee-8631-6c5bc3aed029", //id: "2f1c60f2-f30b-4432-8129-9131c6e398dd", }, group: values.group ? values.group : undefined,