Skip to content

Commit

Permalink
Merge pull request #789 from asmita-chandra/dev
Browse files Browse the repository at this point in the history
786 Update registration fields
  • Loading branch information
ashleyleal authored Jul 2, 2024
2 parents 89de135 + de16f5d commit e89e2d1
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 53 deletions.
115 changes: 69 additions & 46 deletions client/src/pages/Registration/RegistrationFields.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const textValidation = (value) => {
return 'Please use Aa-Zz characters';
}
} else {
return 'Please ensure that your full name is between 1 and 50 characters';
return 'Please ensure that your name is between 1 and 50 characters';
}
};

Expand Down Expand Up @@ -186,16 +186,6 @@ export const fields = {
noEdit: true,
localStorageKey: 'registration-discipline',
},
shirtSize: {
type: 'dropdown',
label: 'T-shirt Size',
values: ['S', 'M', 'L', 'XL', '2XL', '3XL'],
initialSelectedIndex: 1,
className: 'half-width-input',
isRequiredInput: true,
noEdit: true,
localStorageKey: 'registration-shirtSize',
},
phoneNumberLabel: {
type: 'label',
label: 'Phone Number',
Expand Down Expand Up @@ -281,7 +271,7 @@ export const fields = {
},
HealthSafety: {
medicalInfo: {
type: 'radio',
type: 'dropdown',
values: ['Yes', 'No'],
initialSelectedIndex: 1,
label: 'Medical Conditions',
Expand Down Expand Up @@ -385,7 +375,7 @@ export const fields = {
},
},
accommodation: {
type: 'radio',
type: 'dropdown',
label: 'Would you like us to reach out to you about how we can best accommodate you?',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
Expand All @@ -395,10 +385,20 @@ export const fields = {
},
},
ExtraEvents: {
shirtSize: {
type: 'dropdown',
label: 'T-shirt Size',
values: ['S', 'M', 'L', 'XL', '2XL', '3XL'],
initialSelectedIndex: 1,
className: 'half-width-input',
isRequiredInput: true,
noEdit: true,
localStorageKey: 'registration-shirtSize',
},
attendingScunt: {
type: 'radio',
type: 'dropdown',
label:
'Would you like to participate in Havenger Scunt? (It will take place on the evening of Wednesday, September 6th)',
'Would you like to participate in Havenger Scunt? (It will take place on the evening of Wednesday, August 28th)',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
localStorageKey: 'registration-scunt',
Expand All @@ -411,40 +411,35 @@ export const fields = {
"What is Havenget Scunt? Havenger Scunt is a scavenger hunt around the city of Toronto! Don't miss out on one of the most popular f!rosh week events! Scunt is an exciting night of challenges for all comfort levels.",
isBold: true,
},
summerLocationLabel: {
type: 'label',
label: 'Where will you be located for the majority of the summer?',
attendingNiteLifeCarnival: {
type: 'dropdown',
label: 'Would you be interested in attending a carnival with other UofT Departments?',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
isRequiredInput: false,
noEdit: false,
localStorageKey: 'registration-attendingNiteLifeCarnival',
},
summerLocationCity: {
type: 'text',
inputType: 'text',
label: 'City',
placeholder: 'Toronto',
isRequiredInput: true,
attendingRetreat: {
type: 'dropdown',
label:
'Would you like to attend an overnight retreat on September 9th-10th at Hart House Farms (at an additional cost)?',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
isRequiredInput: false,
noEdit: false,
localStorageKey: 'registration-summerLocationCity',
errorMessage: 'Please enter your city',
className: 'half-width-input',
validation: textLengthValidation,
localStorageKey: 'registration-attendingRetreat',
},
summerLocationCountry: {
type: 'text',
inputType: 'text',
label: 'Country (2 character code)',
placeholder: 'CA',
hasRestrictedInput: true,
isRequiredInput: true,

summerLocationQuery: {
type: 'dropdown',
label:
'Will you be based in Toronto or the GTA over the summer? (or would you be available for events)',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
isRequiredInput: false,
noEdit: false,
localStorageKey: 'registration-summerLocationCountry',
errorMessage: 'Please enter your country',
className: 'half-width-input',
validation: (value) => {
if (/^[A-Z]*$/.test(value) && value.length === 2) {
return true;
} else {
return 'Please use the 2 letter country code';
}
},
localStorageKey: 'registration-summerLocationQuery',
},
moveToToronto: {
type: 'dropdown',
Expand All @@ -456,8 +451,36 @@ export const fields = {
noEdit: false,
localStorageKey: 'registration-moveToToronto',
},
commuterProgramQuery: {
type: 'dropdown',
label:
'Will you take part in the Commuter Program (you can still sign up via links on Instagram and Frosh week website)?',
values: ['Yes', 'No', 'Put me on the Waitlist'],
initialSelectedIndex: 0,
isRequiredInput: false,
noEdit: false,
localStorageKey: 'registration-commuterProgramQuery',
},
commuterChestnutQuery: {
type: 'dropdown',
label: 'Would you like to stay up at Chestnut during Frosh week with an additional cost?',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
isRequiredInput: false,
noEdit: false,
localStorageKey: 'registration-commuterChestnutQuery',
},
bursary: {
type: 'dropdown',
label: 'Would you be interested in a bursary?',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
isRequiredInput: false,
noEdit: false,
localStorageKey: 'registration-bursary',
},
photograph: {
type: 'radio',
type: 'dropdown',
label: 'Are you okay with being photographed during Frosh Week?',
values: ['Yes', 'No'],
initialSelectedIndex: 0,
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Registration/RegistrationForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Checkboxes } from '../../components/form/Checkboxes/Checkboxes';
import { Button } from '../../components/button/Button/Button';
import { Tabs } from '../../components/tabs/tabs';
import './RegistrationForm.scss';
import MainFroshLogo from '../../assets/logo/frosh-main-logo-with-bg.svg';
import MainFroshLogo from '../../assets/logo/main-logo.png';
import { ButtonOutlined } from '../../components/button/ButtonOutlined/ButtonOutlined';
import { Link, useNavigate } from 'react-router-dom';
import { PopupModal } from '../../components/popup/PopupModal';
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"dependencies": {
"concurrently": "^8.2.0",
"dotenv": "^16.4.5",
"socket.io-client": "^4.5.2",
"yarn": "^1.22.22"
}
}
}
15 changes: 10 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ braces@^3.0.2:
dependencies:
fill-range "^7.0.1"

[email protected]:
version "5.2.0"
resolved "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz"
integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==

chalk@^4.1.2:
version "4.1.2"
resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz"
Expand All @@ -71,11 +76,6 @@ chalk@^4.1.2:
ansi-styles "^4.1.0"
supports-color "^7.1.0"

[email protected]:
version "5.2.0"
resolved "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz"
integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==

clean-stack@^2.0.0:
version "2.2.0"
resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz"
Expand Down Expand Up @@ -173,6 +173,11 @@ debug@^4.3.4, debug@~4.3.1, debug@~4.3.2:
dependencies:
ms "2.1.2"

dotenv@^16.4.5:
version "16.4.5"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-16.4.5.tgz#cdd3b3b604cb327e286b4762e13502f717cb099f"
integrity sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==

eastasianwidth@^0.2.0:
version "0.2.0"
resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz"
Expand Down

0 comments on commit e89e2d1

Please sign in to comment.