diff --git a/src/views/workplace-collaboration-view.jsx b/src/views/workplace-collaboration-view.jsx index 7fc1fba7..5df9aac4 100644 --- a/src/views/workplace-collaboration-view.jsx +++ b/src/views/workplace-collaboration-view.jsx @@ -196,9 +196,20 @@ function ImgFromFile({fileId, className}) { const LEVEL_NUMERALS = ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十']; const levelLabel = n => LEVEL_NUMERALS[n - 1] || String(n); -function DeptRow({dept, depth, expanded, onToggle}) { +// isMe check shared with PersonRow below -- organization member/participant ids across this +// chapter's endpoints aren't consistently confirmed to carry the 'usr' prefix (see resolveUserName's +// comment), so the same "try bare, then usr-prefixed" comparison is duplicated at both call sites. +const isMyUserId = (id, myUserId) => id === myUserId || 'usr' + id === myUserId; + +function DeptRow({dept, depth, expanded, containsMe, onToggle}) { const icon = depth === 0 ? 'business' : 'diamond'; - return