diff --git a/packages/common/index.ts b/packages/common/index.ts
index c73b50046..4b12a025a 100644
--- a/packages/common/index.ts
+++ b/packages/common/index.ts
@@ -83,6 +83,7 @@ export class User {
photoURL!: string
defaultMessage?: string
sid?: number
+ namePronunciation?: string
includeDefaultMessage!: boolean
courses!: UserCourse[]
desktopNotifsEnabled!: boolean
@@ -201,6 +202,10 @@ export class UserPartial {
@IsOptional()
sid?: number
+ @IsString()
+ @IsOptional()
+ namePronunciation?: string
+
@IsOptional()
@IsString()
TANotes?: string
@@ -1722,6 +1727,10 @@ export class UpdateProfileParams {
@IsOptional()
email?: string
+ @IsString()
+ @IsOptional()
+ namePronunciation?: string
+
@IsString()
@IsOptional()
defaultMessage?: string
@@ -2585,6 +2594,10 @@ export class AccountRegistrationParams {
@IsOptional()
sid?: number
+ @IsString()
+ @IsOptional()
+ namePronunciation?: string
+
@IsString()
recaptchaToken!: string
}
diff --git a/packages/frontend/app/(auth)/register/page.tsx b/packages/frontend/app/(auth)/register/page.tsx
index 4b83be453..9abdd29cc 100644
--- a/packages/frontend/app/(auth)/register/page.tsx
+++ b/packages/frontend/app/(auth)/register/page.tsx
@@ -269,6 +269,10 @@ export default function RegisterPage(props: {
+
+
+
+
{item.name}
+ {item.namePronunciation ? ` (${item.namePronunciation})` : ''}
{item.organizationRole == OrganizationRole.ADMIN && (
= ({
{`[${question.location ?? 'Unselected'}] `}
)}
{question.creator.name}
+ {question.creator.namePronunciation
+ ? ` (${question.creator.namePronunciation})`
+ : ''}
)}
diff --git a/packages/frontend/app/(dashboard)/profile/components/EditProfile.tsx b/packages/frontend/app/(dashboard)/profile/components/EditProfile.tsx
index ad287e433..4b9bbc9f6 100644
--- a/packages/frontend/app/(dashboard)/profile/components/EditProfile.tsx
+++ b/packages/frontend/app/(dashboard)/profile/components/EditProfile.tsx
@@ -27,7 +27,14 @@ const EditProfile: React.FC = () => {
newProfile.sid = parseInt(`${newProfile.sid}`, 10) || undefined
if (userInfo.email === updateProfile.email) {
await API.profile
- .patch(pick(newProfile, ['firstName', 'lastName', 'sid']))
+ .patch(
+ pick(newProfile, [
+ 'firstName',
+ 'lastName',
+ 'sid',
+ 'namePronunciation',
+ ]),
+ )
.then(() => setUserInfo({ ...userInfo, ...updateProfile }))
.catch((error) => {
const errorMessage = getErrorMessage(error)
@@ -35,7 +42,15 @@ const EditProfile: React.FC = () => {
})
} else {
await API.profile
- .patch(pick(newProfile, ['firstName', 'lastName', 'email', 'sid']))
+ .patch(
+ pick(newProfile, [
+ 'firstName',
+ 'lastName',
+ 'email',
+ 'sid',
+ 'namePronunciation',
+ ]),
+ )
.then(() => setUserInfo({ ...userInfo, ...updateProfile }))
.catch((error) => {
const errorMessage = getErrorMessage(error)
@@ -49,12 +64,20 @@ const EditProfile: React.FC = () => {
firstName: updateProfile.firstName,
lastName: updateProfile.lastName,
sid: updateProfile.sid,
+ namePronunciation: updateProfile.namePronunciation,
},
}
newProfile.sid = parseInt(`${newProfile.sid}`, 10) || undefined
setUserInfo(newProfile)
await API.profile
- .patch(pick(newProfile, ['firstName', 'lastName', 'sid']))
+ .patch(
+ pick(newProfile, [
+ 'firstName',
+ 'lastName',
+ 'sid',
+ 'namePronunciation',
+ ]),
+ )
.catch((error) => {
const errorMessage = getErrorMessage(error)
message.error('Error updating profile:' + errorMessage)
@@ -147,6 +170,14 @@ const EditProfile: React.FC = () => {
+
+
+
+
+
+
+
+