fix(ui): 修复登录与并发请求并统一表格、主题和页面展示
验证:868 项单测、ESLint、Prettier、UI 依赖审计和差异检查通过。
This commit is contained in:
@@ -16,6 +16,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
For commercial licensing, please contact support@quantumnous.com
|
||||
*/
|
||||
import { formatUserReference } from '../../helpers/safeDisplay';
|
||||
|
||||
import { I18N_TECHNICAL_TEXT } from '../../i18n/technicalText.js';
|
||||
import {
|
||||
@@ -486,7 +487,10 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
|
||||
const key = log.user_id ?? 'unknown';
|
||||
if (!groups.has(key)) {
|
||||
groups.set(key, {
|
||||
name: log.display_name || log.username || `User#${log.user_id}`,
|
||||
name: formatUserReference(
|
||||
log.display_name || log.username,
|
||||
log.user_id,
|
||||
),
|
||||
rows: [],
|
||||
});
|
||||
}
|
||||
@@ -595,7 +599,7 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
|
||||
members.forEach((m) => {
|
||||
opts.push({
|
||||
value: m.user_id,
|
||||
label: m.display_name || m.username || `User#${m.user_id}`,
|
||||
label: formatUserReference(m.display_name || m.username, m.user_id),
|
||||
});
|
||||
});
|
||||
return opts;
|
||||
@@ -616,7 +620,10 @@ const OrgLogs = ({ orgId, orgRole, isDeptManager = false }) => {
|
||||
: t('仅本人');
|
||||
if (canViewTeamUsage && af.userId) {
|
||||
const m = members.find((x) => String(x.user_id) === String(af.userId));
|
||||
member = m ? m.display_name || m.username : `User#${af.userId}`;
|
||||
member = formatUserReference(
|
||||
m?.display_name || m?.username,
|
||||
m?.user_id ?? af.userId,
|
||||
);
|
||||
}
|
||||
const time =
|
||||
af.startTimestamp && af.endTimestamp
|
||||
|
||||
Reference in New Issue
Block a user