diff --git a/app/(main)/administration/members/[userId]/page.tsx b/app/(main)/administration/members/[userId]/page.tsx
index dbb40cb..c10c686 100644
--- a/app/(main)/administration/members/[userId]/page.tsx
+++ b/app/(main)/administration/members/[userId]/page.tsx
@@ -63,11 +63,11 @@ export default async function TeamProfilePage({
-
+
{user.first_name}
-
+
{user.last_name}
@@ -78,6 +78,11 @@ export default async function TeamProfilePage({
{user.email}
+
+
+
{user.phone}
+
+
diff --git a/app/(main)/profile/components/ProfileForm.tsx b/app/(main)/profile/components/ProfileForm.tsx
index 597da44..ee44062 100644
--- a/app/(main)/profile/components/ProfileForm.tsx
+++ b/app/(main)/profile/components/ProfileForm.tsx
@@ -14,6 +14,7 @@ type ProfileFormValues = {
email: string;
firstName: string;
lastName: string;
+ phone: string;
};
export default function ProfileForm({ user }: { user: User }) {
@@ -40,6 +41,7 @@ export default function ProfileForm({ user }: { user: User }) {
firstName: user.first_name,
lastName: user.last_name,
email: user.email,
+ phone: user.phone,
},
});
@@ -115,6 +117,7 @@ export default function ProfileForm({ user }: { user: User }) {
if (data.email !== user.email) changes.email = data.email;
if (selectedFile || isPendingDelete)
changes.profile_photo_url = finalPhotoUrl;
+ if (data.phone != user.phone) changes.phone = data.phone;
const result = await updateUser(user.user_id, changes);
@@ -129,6 +132,7 @@ export default function ProfileForm({ user }: { user: User }) {
firstName: data.firstName,
lastName: data.lastName,
email: user.email,
+ phone: user.phone,
});
setIsEditing(false);
if (data.email !== user.email) {
@@ -233,6 +237,23 @@ export default function ProfileForm({ user }: { user: User }) {
)}
+
+
+ {isEditing ? (
+ <>
+
+ {errors.phone?.type === 'required' && (
+
Phone number is required.
+ )}
+ >
+ ) : (
+
{watchedValues.phone}
+ )}
+
+
{isEditing && (