From f9696298b50ecb305ae4cab83271658203d7d5ec Mon Sep 17 00:00:00 2001 From: mahigangal Date: Sun, 22 Feb 2026 19:56:24 -0800 Subject: [PATCH 1/6] column added, ran migration, textbox added in profile settings --- packages/common/index.ts | 4 ++ .../profile/components/EditProfile.tsx | 37 +++++++++++++++++-- packages/frontend/package.json | 2 +- .../1771818704948-add-name-pronunciation.ts | 15 ++++++++ packages/server/src/profile/user.entity.ts | 3 ++ 5 files changed, 57 insertions(+), 4 deletions(-) create mode 100644 packages/server/migration/1771818704948-add-name-pronunciation.ts diff --git a/packages/common/index.ts b/packages/common/index.ts index c73b50046..86aa9cfe8 100644 --- a/packages/common/index.ts +++ b/packages/common/index.ts @@ -1722,6 +1722,10 @@ export class UpdateProfileParams { @IsOptional() email?: string + @IsString() + @IsOptional() + namePronunciation?: string + @IsString() @IsOptional() defaultMessage?: string 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 = () => { + + + + + + + +