Skip to content

Commit 367263c

Browse files
authored
Chagnes email cell to represent new admin role (#64)
1 parent 59b0e8c commit 367263c

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

components/kern-table/CellComponents.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,12 +299,23 @@ function EtlApiTokenCell({ organization }) {
299299
}
300300

301301
function EmailCell({ user }) {
302+
const tooltipContent = useMemo(() => {
303+
let content = user.email;
304+
if (user.sso_provider) content = "SSO User via " + user.sso_provider;
305+
if (user.new_admin_role) content += " (admin)";
306+
return content;
307+
}, [user])
308+
302309
return (
303310
<div className="flex flex-row items-center">
304-
{user.sso_provider ? <Tooltip content={"SSO User via " + user.sso_provider} color="invert">
305-
<span className="text-blue-700 truncate max-w-xs">{user.email}*</span></Tooltip> : <Tooltip content={user.email} color="invert" className="cursor-auto">
306-
<span className="truncate max-w-xs">{user.email}</span>
307-
</Tooltip>
311+
312+
{user.new_admin_role ? <Tooltip content={tooltipContent} color="invert">
313+
<span className="text-orange-700 truncate max-w-xs">{user.email}*</span></Tooltip> :
314+
user.sso_provider ? <Tooltip content={tooltipContent} color="invert">
315+
<span className="text-blue-700 truncate max-w-xs">{user.email}*</span></Tooltip> :
316+
<Tooltip content={tooltipContent} color="invert" className="cursor-auto">
317+
<span className="truncate max-w-xs">{user.email}</span>
318+
</Tooltip>
308319
}
309320
</div>
310321
)

0 commit comments

Comments
 (0)