Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/config/genders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export enum Genders {
FEMALE = 'Female',
MALE = 'Male',
NON_BINARY = 'Non-binary',
OTHER = 'Other (not listed)',
NO_ANSWER = 'Prefer not to answer',
}
export default Genders;
2 changes: 1 addition & 1 deletion src/config/userTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface IAccount {
// The user's birthdate
birthDate?: string;
// The preferred pronoun
pronoun: string;
pronoun: String[];
// The database id (if new, leave blank / make '')
id: string;
_id?: string;
Expand Down
6 changes: 3 additions & 3 deletions src/features/Account/ManageAccountForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const ManageAccountForm: React.FC<IManageAccountProps> = (props) => {
lastName: '',
password: getNestedAttr(props, ['location', 'state', 'password']) || '',
phoneNumber: '',
pronoun: '',
pronoun: [],
gender: '',
dietaryRestrictions: [],
});
Expand Down Expand Up @@ -319,17 +319,17 @@ const ManageAccountForm: React.FC<IManageAccountProps> = (props) => {
options={getOptionsFromEnum(Genders)}
required={true}
value={fp.values.gender}
showOptionalLabel={true}
/>
<ErrorMessage component={FormikElements.Error} name="gender" />
<FastField
component={FormikElements.Select}
creatable={true}
label={CONSTANTS.PRONOUN_LABEL}
name={'pronoun'}
isMulti={true}
placeholder={CONSTANTS.PRONOUN_PLACEHOLDER}
options={getOptionsFromEnum(Pronouns)}
required={true}
required={false}
value={fp.values.pronoun}
showOptionalLabel={true}
/>
Expand Down
6 changes: 3 additions & 3 deletions src/features/Account/validationSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ const getValidationSchema = (isCreate: boolean) => {
email: string().required('Required').email('Must be a valid email'),
password,
newPassword: string().min(6, 'Must be at least 6 characters'),
pronoun: string(),
gender: string(),
pronoun: array().of(string()),
gender: string().required('Required'),
dietaryRestrictions: array().of(string()),
phoneNumber: string().test(
phoneNumber: string().required('Required').test(
'validPhone',
'Must be a valid phone number',
(value) => {
Expand Down
2 changes: 1 addition & 1 deletion src/features/HackPass/Pass.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const Pass: React.FunctionComponent<IPassProps> = (
<img src={props.qrData} className="qrCode" alt="" />
<div className="info">
<h2>{props.account.firstName}</h2>
<h3>{props.account.pronoun}</h3>
<h3>{props.account.pronoun.join(", ")}</h3>
<h3>{props.hacker.application.general.school}</h3>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/util/UserInfoHelperFunctions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export async function generateHackPass(

if (account.pronoun) {
doc.text('Hacker', 8, 15);
doc.text(account.pronoun, 8, 17);
doc.text(account.pronoun.join(", "), 8, 17);
} else {
doc.text('Hacker', 8, 16);
}
Expand Down