Merge pull request #722 from SuanmoSuanyangTechnology/fix/v0.2.9_zy
fix(web): log
This commit is contained in:
@@ -128,6 +128,7 @@ const Menu: FC<{
|
|||||||
|
|
||||||
/** Filter menus based on user role and source */
|
/** Filter menus based on user role and source */
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (!user) return
|
||||||
let menuList: MenuItem[] = []
|
let menuList: MenuItem[] = []
|
||||||
|
|
||||||
if (user.role === 'member' && source === 'space') {
|
if (user.role === 'member' && source === 'space') {
|
||||||
@@ -136,7 +137,7 @@ const Menu: FC<{
|
|||||||
menuList = allMenus[source] || []
|
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')) {
|
if (noAuthList && !noAuthList?.includes('all')) {
|
||||||
const filterMenus = (list: MenuItem[]): MenuItem[] =>{
|
const filterMenus = (list: MenuItem[]): MenuItem[] =>{
|
||||||
|
|||||||
@@ -34,16 +34,16 @@ const Statistics: FC = () => {
|
|||||||
className: 'rb:text-[#212332]'
|
className: 'rb:text-[#212332]'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('user.createTime'),
|
title: t('application.createTime'),
|
||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
key: 'created_at',
|
key: 'created_at',
|
||||||
render: (createdAt: string) => formatDateTime(createdAt, 'YYYY-MM-DD HH:mm:ss'),
|
render: (createdAt: string) => formatDateTime(createdAt, 'YYYY-MM-DD HH:mm:ss'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('user.lastLoginTime'),
|
title: t('common.updated_at'),
|
||||||
dataIndex: 'last_login_at',
|
dataIndex: 'updated_at',
|
||||||
key: 'last_login_at',
|
key: 'updated_at',
|
||||||
render: (lastLoginAt: string) => lastLoginAt ? formatDateTime(lastLoginAt, 'YYYY-MM-DD HH:mm:ss') : '-',
|
render: (updatedAt: string) => updatedAt ? formatDateTime(updatedAt, 'YYYY-MM-DD HH:mm:ss') : '-',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: t('common.operation'),
|
title: t('common.operation'),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 16:37:12
|
* @Date: 2026-02-03 16:37:12
|
||||||
* @Last Modified by: ZhaoYing
|
* @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
|
* Invite Register Page
|
||||||
@@ -144,7 +144,7 @@ const InviteRegister: React.FC = () => {
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
const response = res as LoginInfo;
|
const response = res as LoginInfo;
|
||||||
updateLoginInfo(response);
|
updateLoginInfo(response);
|
||||||
navigate('/');
|
navigate('/', { replace: true });
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user