Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/@settings/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const TAB_DESCRIPTIONS: Record<TabType, string> = {
data: 'Manage your data sources',
github: 'Manage GitHub connection and repository settings',
'deployed-apps': 'View and manage your deployed applications',
members: 'Manage your users',
members: 'Manage your members',
roles: 'Manage roles and permissions for users',
environments: 'Manage your environments',
};
Expand Down
2 changes: 1 addition & 1 deletion app/components/@settings/tabs/roles/AssignRoleUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default function AssignRoleUsers({ role, onRoleUpdate, closeAssignUsers }
className="px-4 py-2 bg-accent-500 hover:bg-accent-600 text-gray-950 dark:text-gray-950 rounded-lg transition-colors text-sm font-medium disabled:opacity-50 disabled:cursor-not-allowed"
>
{isSaving
? 'Assigning Users...'
? 'Assigning Members...'
: `Assign ${selectedUsers.size ? selectedUsers.size : ''} User${selectedUsers.size !== 1 ? 's' : ''}`}
</button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/components/@settings/tabs/roles/RoleUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ export default function RoleUsers({ role, onRoleUpdate, onAssignUsers }: RoleUse
)}
>
<Plus className="w-4 h-4 text-white" />
Assign Users
Assign Members
</button>
</div>

<div>
<div className="flex justify-between text-sm text-gray-400 px-4 py-2 border-b border-gray-700">
<span>Assigned Users</span>
<span>Assigned Members</span>
</div>

<div className="space-y-px pb-4">
Expand Down
6 changes: 3 additions & 3 deletions app/components/@settings/tabs/users/UsersTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ export default function UsersTab() {
return (
<div className="space-y-4">
<div className="flex items-center gap-2 p-2">
<h2 className="text-lg text-white">Users</h2>
<h2 className="text-lg text-white">Members</h2>
<span className="text-lg text-gray-400">Loading...</span>
</div>
<div className="flex items-center justify-center p-8">
<div className="text-gray-400">Loading users...</div>
<div className="text-gray-400">Loading members...</div>
</div>
</div>
);
Expand All @@ -181,7 +181,7 @@ export default function UsersTab() {
<Tooltip.Provider delayDuration={50}>
<div className="space-y-4">
<div className="flex items-center gap-2 p-2">
<h2 className="text-lg text-white">Users</h2>
<h2 className="text-lg text-white">Members</h2>
<span className="text-lg text-gray-400">{filteredUsers.length}</span>
</div>

Expand Down
4 changes: 2 additions & 2 deletions app/components/database/SampleDatabaseTooltip.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ export const SampleDatabaseTooltip = () => {
contact info, and subscription tier.
</div>
<div>
<strong className="text-primary">Users</strong> – People who work for each organization, including their
roles and login activity.
<strong className="text-primary">Members</strong> – People who work for each organization, including
their roles and login activity.
</div>
<div>
<strong className="text-primary">Products</strong> – Items or services offered by organizations, with
Expand Down
22 changes: 13 additions & 9 deletions app/lib/services/userService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,19 @@ export const userService = {
},

async getAllUsers(): Promise<UserProfile[]> {
const users = await prisma.user.findMany({ where: { isAnonymous: { not: true } } });
return users.map((user) => ({
id: user.id,
name: user.name,
email: user.email,
image: user.image,
role: user.role,
telemetryEnabled: user.telemetryEnabled,
}));
return await prisma.user.findMany({
where: {
OR: [{ isAnonymous: false }, { isAnonymous: null }],
},
select: {
id: true,
name: true,
email: true,
image: true,
role: true,
telemetryEnabled: true,
},
});
},

async getUserByEmail(email: string): Promise<UserProfile> {
Expand Down