From bfed5404b4f39418c9de0a1ee06115a7c610b922 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Thu, 25 Dec 2025 13:52:50 +0800 Subject: [PATCH] fix(web): update user profile --- web/src/i18n/en.ts | 2 +- web/src/i18n/zh.ts | 2 +- .../views/UserMemoryDetail/components/EndUserProfile.tsx | 2 +- .../UserMemoryDetail/components/EndUserProfileModal.tsx | 8 ++++---- web/src/views/UserMemoryDetail/types.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/web/src/i18n/en.ts b/web/src/i18n/en.ts index c1420071..585a191a 100644 --- a/web/src/i18n/en.ts +++ b/web/src/i18n/en.ts @@ -1050,7 +1050,7 @@ export const en = { endUserProfile: 'Core Profile', editEndUserProfile: 'Edit', - name: 'Name', + other_name: 'Name', position: 'Position', department: 'Department', contact: 'Contact', diff --git a/web/src/i18n/zh.ts b/web/src/i18n/zh.ts index 7eecaf45..be429b84 100644 --- a/web/src/i18n/zh.ts +++ b/web/src/i18n/zh.ts @@ -1134,7 +1134,7 @@ export const zh = { endUserProfile: '核心档案', editEndUserProfile: '编辑', - name: '姓名', + other_name: '姓名', position: '职位', department: '部门', contact: '联系方式', diff --git a/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx b/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx index 8138231a..144beff7 100644 --- a/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx +++ b/web/src/views/UserMemoryDetail/components/EndUserProfile.tsx @@ -37,7 +37,7 @@ const EndUserProfile:FC = () => { } const formatItems = useCallback(() => { if (!data) return [] - return ['name', 'position', 'department', 'contact', 'phone', 'hire_date'].map(key => ({ + return ['other_name', 'position', 'department', 'contact', 'phone', 'hire_date'].map(key => ({ key, label: t(`userMemory.${key}`), children: key === 'hire_date' && data[key] ? dayjs(data[key as keyof EndUser]).format('YYYY-MM-DD') : String(data[key as keyof EndUser] || ''), diff --git a/web/src/views/UserMemoryDetail/components/EndUserProfileModal.tsx b/web/src/views/UserMemoryDetail/components/EndUserProfileModal.tsx index 37bca368..4682e2ae 100644 --- a/web/src/views/UserMemoryDetail/components/EndUserProfileModal.tsx +++ b/web/src/views/UserMemoryDetail/components/EndUserProfileModal.tsx @@ -47,7 +47,7 @@ const EndUserProfileModal = forwardRef { setLoading(false) @@ -85,8 +85,8 @@ const EndUserProfileModal = forwardRef @@ -118,7 +118,7 @@ const EndUserProfileModal = forwardRef - + diff --git a/web/src/views/UserMemoryDetail/types.ts b/web/src/views/UserMemoryDetail/types.ts index 8bbf60b6..2c698b38 100644 --- a/web/src/views/UserMemoryDetail/types.ts +++ b/web/src/views/UserMemoryDetail/types.ts @@ -126,7 +126,7 @@ export interface EndUser { department: string; contact: string; phone: string; - hire_date: string | number | Dayjs + hire_date: string | number | Dayjs | null; } export interface EndUserProfileModalRef { handleOpen: (vo: EndUser) => void;