hainenber commented on code in PR #39942:
URL: https://github.com/apache/superset/pull/39942#discussion_r3294166474


##########
superset-frontend/src/features/users/utils.ts:
##########
@@ -44,6 +44,15 @@ export const deleteUser = async (userId: number) =>
     endpoint: `/api/v1/security/users/${userId}`,
   });
 
+export const getUserDisplayLabel = (user: {
+  first_name?: string;
+  last_name?: string;
+  username?: string;
+}): string =>
+  [user.first_name, user.last_name].filter(Boolean).join(' ') ||
+  user.username ||
+  '';

Review Comment:
   ```suggestion
     'N/A;
   ```
   
   I'd recommend to at least show _something_ for these mysterious users.



##########
superset-frontend/src/features/users/utils.ts:
##########
@@ -44,6 +44,15 @@ export const deleteUser = async (userId: number) =>
     endpoint: `/api/v1/security/users/${userId}`,
   });
 
+export const getUserDisplayLabel = (user: {
+  first_name?: string;
+  last_name?: string;
+  username?: string;
+}): string =>
+  [user.first_name, user.last_name].filter(Boolean).join(' ') ||
+  user.username ||
+  '';

Review Comment:
   ```suggestion
     'N/A';
   ```
   
   I'd recommend to at least show _something_ for these mysterious users.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to