diff --git a/web/src/app/admin/users/page.tsx b/web/src/app/admin/users/page.tsx index 8dbc6c308d5..ac3369a7ef2 100644 --- a/web/src/app/admin/users/page.tsx +++ b/web/src/app/admin/users/page.tsx @@ -18,6 +18,8 @@ import { ErrorCallout } from "@/components/ErrorCallout"; import { HidableSection } from "@/app/admin/assistants/HidableSection"; import BulkAdd from "@/components/admin/users/BulkAdd"; import { UsersResponse } from "@/lib/users/interfaces"; +import { UserRole } from "@/lib/types"; +import SlackUserTable from "@/components/admin/users/SlackUserTable"; const ValidDomainsDisplay = ({ validDomains }: { validDomains: string[] }) => { if (!validDomains.length) { @@ -101,6 +103,9 @@ const UsersTables = ({ const finalInvited = invited.filter( (user) => !accepted.map((u) => u.email).includes(user.email) ); + const slackUsers = accepted.filter( + (user) => user.role === UserRole.SLACK_USER + ); return ( <> @@ -125,6 +130,17 @@ const UsersTables = ({ )} + + + {slackUsers.length > 0 ? ( + + ) : ( + + To invite additional teammates, use the Invite Users button + above! + + )} + = ({ users }) => { + return ( + <> + + This list displays Slack users who have access to Danswer through the + Slack integration. + + + {users.map((user) => ( + + {user.email} + + ))} + + > + ); +}; + +export default SlackUserTable;
+ This list displays Slack users who have access to Danswer through the + Slack integration. +