feat(user_info_view.tsx): be able to click in and see all teams user is part of

makes it easy to see which teams a user belongs to
This commit is contained in:
Krrish Dholakia 2025-04-22 16:30:04 -07:00
parent 44264ab6d6
commit ea07c83503
4 changed files with 337 additions and 2 deletions

View file

@ -751,8 +751,10 @@ export const userInfoCall = async (
userRole: String,
viewAll: Boolean = false,
page: number | null,
page_size: number | null
page_size: number | null,
lookup_user_id: boolean = false
) => {
console.log(`userInfoCall: ${userID}, ${userRole}, ${viewAll}, ${page}, ${page_size}, ${lookup_user_id}`)
try {
let url: string;
@ -766,7 +768,7 @@ export const userInfoCall = async (
} else {
// Use /user/info endpoint for individual user info
url = proxyBaseUrl ? `${proxyBaseUrl}/user/info` : `/user/info`;
if (userRole === "Admin" || userRole === "Admin Viewer") {
if ((userRole === "Admin" || userRole === "Admin Viewer") && !lookup_user_id) {
// do nothing
} else if (userID) {
url += `?user_id=${userID}`;