File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
static/app/components/modals/inviteMembersModal Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,6 @@ export default function InviteMembersModalView({
64
64
willInvite,
65
65
error,
66
66
} : Props ) {
67
- const disableInputs = sendingInvites || complete ;
68
-
69
67
const inviteEmails = invites . map ( inv => inv . email ) ;
70
68
const hasDuplicateEmails = inviteEmails . length !== new Set ( inviteEmails ) . size ;
71
69
const isValidInvites = invites . length > 0 && ! hasDuplicateEmails ;
@@ -76,18 +74,27 @@ export default function InviteMembersModalView({
76
74
</ Alert >
77
75
) : null ;
78
76
77
+ const userEmails = member ?. user ?. emails ;
78
+ const isVerified = userEmails ? userEmails . some ( element => element . is_verified ) : false ;
79
+
80
+ const disableInputs = sendingInvites || complete || ! isVerified ;
81
+
79
82
return (
80
83
< Fragment >
81
84
{ errorAlert }
82
85
< Heading > { t ( 'Invite New Members' ) } </ Heading >
83
- { willInvite ? (
84
- < Subtext > { t ( 'Invite new members by email to join your organization.' ) } </ Subtext >
85
- ) : (
86
+ { ! isVerified ? (
87
+ < Alert type = "warning" showIcon >
88
+ { t ( 'Please verify your email before inviting other users.' ) }
89
+ </ Alert >
90
+ ) : ! willInvite && isVerified ? (
86
91
< Alert type = "warning" showIcon >
87
92
{ t (
88
93
'You can’t invite users directly, but we’ll forward your request to an org owner or manager for approval.'
89
94
) }
90
95
</ Alert >
96
+ ) : (
97
+ < Subtext > { t ( 'Invite new members by email to join your organization.' ) } </ Subtext >
91
98
) }
92
99
93
100
{ headerInfo }
You can’t perform that action at this time.
0 commit comments