Skip to content

Commit 2e48fa1

Browse files
authored
feat(team-members): Add a pending tag to members who are invited but not accepted (#99551)
1 parent baaef2a commit 2e48fa1

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

static/app/views/settings/organizationTeams/teamMembers.spec.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,4 +409,14 @@ describe('TeamMembers', () => {
409409
).toBeEnabled();
410410
expect((await screen.findAllByRole('button', {name: 'Remove'})).at(0)).toBeEnabled();
411411
});
412+
413+
it('renders a "Pending" tag for pending team members', async () => {
414+
render(<TeamMembers team={team} />, {
415+
initialRouterConfig,
416+
organization,
417+
});
418+
419+
// MembersFixure has a single pending member
420+
expect(await screen.findByText('Pending')).toBeInTheDocument();
421+
});
412422
});

static/app/views/settings/organizationTeams/teamMembersRow.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import styled from '@emotion/styled';
22

3+
import {Tag} from 'sentry/components/core/badge/tag';
34
import {Button} from 'sentry/components/core/button';
5+
import {Flex} from 'sentry/components/core/layout';
46
import IdBadge from 'sentry/components/idBadge';
57
import PanelItem from 'sentry/components/panels/panelItem';
68
import TeamRoleSelect from 'sentry/components/teamRoleSelect';
@@ -34,9 +36,10 @@ function TeamMembersRow({
3436

3537
return (
3638
<TeamRolesPanelItem key={member.id}>
37-
<div>
39+
<Flex gap="md">
3840
<IdBadge avatarSize={36} member={member} />
39-
</div>
41+
{member.pending ? <Tag>{t('Pending')}</Tag> : null}
42+
</Flex>
4043
<RoleSelectWrapper>
4144
<TeamRoleSelect
4245
disabled={isSelf || !hasWriteAccess}

0 commit comments

Comments
 (0)