|
@@ -12,7 +12,6 @@ import {
|
|
|
} from 'sentry/actionCreators/indicator';
|
|
|
import {resendMemberInvite, updateMember} from 'sentry/actionCreators/members';
|
|
|
import {Button} from 'sentry/components/button';
|
|
|
-import ButtonBar from 'sentry/components/buttonBar';
|
|
|
import Confirm from 'sentry/components/confirm';
|
|
|
import DateTime from 'sentry/components/dateTime';
|
|
|
import NotFound from 'sentry/components/errors/notFound';
|
|
@@ -292,6 +291,8 @@ class OrganizationMemberDetail extends DeprecatedAsyncView<Props, State> {
|
|
|
const canResend = !expired;
|
|
|
const showAuth = !pending;
|
|
|
|
|
|
+ const showResendButton = (member.pending || member.expired) && canResend;
|
|
|
+
|
|
|
return (
|
|
|
<Fragment>
|
|
|
<SettingsPageHeader
|
|
@@ -304,7 +305,22 @@ class OrganizationMemberDetail extends DeprecatedAsyncView<Props, State> {
|
|
|
/>
|
|
|
|
|
|
<Panel>
|
|
|
- <PanelHeader>{t('Basics')}</PanelHeader>
|
|
|
+ <PanelHeader hasButtons={showResendButton}>
|
|
|
+ {t('Basics')}
|
|
|
+
|
|
|
+ {showResendButton && (
|
|
|
+ <Button
|
|
|
+ data-test-id="resend-invite"
|
|
|
+ size="xs"
|
|
|
+ priority="primary"
|
|
|
+ icon={<IconRefresh />}
|
|
|
+ title={t('Generate a new invite link and send a new email.')}
|
|
|
+ onClick={() => this.handleInvite(true)}
|
|
|
+ >
|
|
|
+ {t('Resend Invite')}
|
|
|
+ </Button>
|
|
|
+ )}
|
|
|
+ </PanelHeader>
|
|
|
|
|
|
<PanelBody>
|
|
|
<PanelItem>
|
|
@@ -329,24 +345,6 @@ class OrganizationMemberDetail extends DeprecatedAsyncView<Props, State> {
|
|
|
</div>
|
|
|
</Details>
|
|
|
</PanelItem>
|
|
|
- <PanelItem>
|
|
|
- {(member.pending || member.expired) && (
|
|
|
- <InviteSection>
|
|
|
- <ButtonBar gap={1}>
|
|
|
- {canResend && (
|
|
|
- <Button
|
|
|
- data-test-id="resend-invite"
|
|
|
- icon={<IconRefresh />}
|
|
|
- title={t('Generate a new invite link and send a new email.')}
|
|
|
- onClick={() => this.handleInvite(true)}
|
|
|
- >
|
|
|
- {t('Resend Invite')}
|
|
|
- </Button>
|
|
|
- )}
|
|
|
- </ButtonBar>
|
|
|
- </InviteSection>
|
|
|
- )}
|
|
|
- </PanelItem>
|
|
|
</PanelBody>
|
|
|
</Panel>
|
|
|
|
|
@@ -455,12 +453,6 @@ const DetailLabel = styled('div')`
|
|
|
color: ${p => p.theme.textColor};
|
|
|
`;
|
|
|
|
|
|
-const InviteSection = styled('div')`
|
|
|
- flex-grow: 1;
|
|
|
- display: flex;
|
|
|
- gap: ${space(1)};
|
|
|
-`;
|
|
|
-
|
|
|
const Footer = styled('div')`
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|