diff --git a/apps/sim/app/workspace/[workspaceId]/settings/components/integrations/integrations-manager.tsx b/apps/sim/app/workspace/[workspaceId]/settings/components/integrations/integrations-manager.tsx index d818238e7b..46ea1679ae 100644 --- a/apps/sim/app/workspace/[workspaceId]/settings/components/integrations/integrations-manager.tsx +++ b/apps/sim/app/workspace/[workspaceId]/settings/components/integrations/integrations-manager.tsx @@ -62,6 +62,8 @@ const roleOptions = [ { value: 'admin', label: 'Admin' }, ] as const +const roleComboOptions = roleOptions.map((option) => ({ value: option.value, label: option.label })) + export function IntegrationsManager() { const params = useParams() const workspaceId = (params?.workspaceId as string) || '' @@ -1315,42 +1317,32 @@ export function IntegrationsManager() { + option.value === member.role)?.label || '' + } + selectedValue={member.role} + onChange={(value) => + handleChangeMemberRole(member.userId, value as WorkspaceCredentialRole) + } + placeholder='Role' + disabled={ + !isSelectedAdmin || (member.role === 'admin' && adminMemberCount <= 1) + } + size='sm' + /> {isSelectedAdmin ? ( - <> - ({ - value: option.value, - label: option.label, - }))} - value={ - roleOptions.find((option) => option.value === member.role)?.label || - '' - } - selectedValue={member.role} - onChange={(value) => - handleChangeMemberRole( - member.userId, - value as WorkspaceCredentialRole - ) - } - placeholder='Role' - disabled={member.role === 'admin' && adminMemberCount <= 1} - size='sm' - /> - - + ) : ( - <> - {member.role} -
- +
)}
))} @@ -1370,10 +1362,7 @@ export function IntegrationsManager() { size='sm' /> ({ - value: option.value, - label: option.label, - }))} + options={roleComboOptions} value={ roleOptions.find((option) => option.value === memberRole)?.label || '' }