审计日志并入系统管理、规范项目成员获取逻辑
This commit is contained in:
@@ -30,7 +30,7 @@ import { ElMessage } from "element-plus";
|
||||
import { fetchComments, createComment } from "../api/comments";
|
||||
import { useStudyStore } from "../store/study";
|
||||
import { listMembers } from "../api/members";
|
||||
import { displayDateTime, displayUser } from "../utils/display";
|
||||
import { displayDateTime, displayUser, getMemberDisplayName } from "../utils/display";
|
||||
|
||||
interface Props {
|
||||
studyId: string;
|
||||
@@ -72,8 +72,8 @@ const loadMembers = async () => {
|
||||
|
||||
const memberMap = computed(() =>
|
||||
members.value.reduce<Record<string, string>>((acc, cur) => {
|
||||
const username = cur?.user?.display_name || cur?.user?.username || cur?.username;
|
||||
if (cur?.user_id) acc[cur.user_id] = username || cur.user_id;
|
||||
const username = getMemberDisplayName(cur);
|
||||
if (cur?.user_id && username) acc[cur.user_id] = username;
|
||||
return acc;
|
||||
}, {})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user