From b699b746a5a6f26d696e1159ae6740ac463b7e6b Mon Sep 17 00:00:00 2001 From: zhaoying Date: Mon, 30 Mar 2026 10:17:27 +0800 Subject: [PATCH] fix(web): log --- web/src/components/SiderMenu/index.tsx | 3 ++- web/src/views/ApplicationConfig/Logs.tsx | 10 +++++----- web/src/views/InviteRegister/index.tsx | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/web/src/components/SiderMenu/index.tsx b/web/src/components/SiderMenu/index.tsx index 3bd0cea3..21f7fd36 100644 --- a/web/src/components/SiderMenu/index.tsx +++ b/web/src/components/SiderMenu/index.tsx @@ -128,6 +128,7 @@ const Menu: FC<{ /** Filter menus based on user role and source */ useEffect(() => { + if (!user) return let menuList: MenuItem[] = [] if (user.role === 'member' && source === 'space') { @@ -136,7 +137,7 @@ const Menu: FC<{ menuList = allMenus[source] || [] } - const noAuthList = ['user', 'pricing'].filter(vo => !user.permissions?.includes(vo) && !user.permissions?.includes('all')) + const noAuthList = ['user', 'pricing'].filter(vo => (Array.isArray(user.permissions) && !user.permissions?.includes(vo) && !user.permissions?.includes('all')) || !Array.isArray(user.permissions)) if (noAuthList && !noAuthList?.includes('all')) { const filterMenus = (list: MenuItem[]): MenuItem[] =>{ diff --git a/web/src/views/ApplicationConfig/Logs.tsx b/web/src/views/ApplicationConfig/Logs.tsx index 88fa2607..49a5bbd6 100644 --- a/web/src/views/ApplicationConfig/Logs.tsx +++ b/web/src/views/ApplicationConfig/Logs.tsx @@ -34,16 +34,16 @@ const Statistics: FC = () => { className: 'rb:text-[#212332]' }, { - title: t('user.createTime'), + title: t('application.createTime'), dataIndex: 'created_at', key: 'created_at', render: (createdAt: string) => formatDateTime(createdAt, 'YYYY-MM-DD HH:mm:ss'), }, { - title: t('user.lastLoginTime'), - dataIndex: 'last_login_at', - key: 'last_login_at', - render: (lastLoginAt: string) => lastLoginAt ? formatDateTime(lastLoginAt, 'YYYY-MM-DD HH:mm:ss') : '-', + title: t('common.updated_at'), + dataIndex: 'updated_at', + key: 'updated_at', + render: (updatedAt: string) => updatedAt ? formatDateTime(updatedAt, 'YYYY-MM-DD HH:mm:ss') : '-', }, { title: t('common.operation'), diff --git a/web/src/views/InviteRegister/index.tsx b/web/src/views/InviteRegister/index.tsx index 42cffff1..72ae55e5 100644 --- a/web/src/views/InviteRegister/index.tsx +++ b/web/src/views/InviteRegister/index.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-03 16:37:12 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-04 10:05:39 + * @Last Modified time: 2026-03-27 22:22:18 */ /** * Invite Register Page @@ -144,7 +144,7 @@ const InviteRegister: React.FC = () => { }).then((res) => { const response = res as LoginInfo; updateLoginInfo(response); - navigate('/'); + navigate('/', { replace: true }); }).finally(() => { setLoading(false); });