Skip to content

Commit

Permalink
Merge pull request #1 from scottsut/invite_member_fix
Browse files Browse the repository at this point in the history
feat(invite members): logic fix
  • Loading branch information
ruanhan authored Jun 3, 2020
2 parents e07b98d + 711ec8d commit fbe935c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
5 changes: 3 additions & 2 deletions webapp/app/containers/Organizations/component/AddForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const AddForm: React.FC<IInviteMemberProps & FormComponentProps> = (
showSearch
filterOption={false}
onSearch={debouncedSearch}
notFoundContent={!fetching ? <Spin size="small" /> : null}
notFoundContent={fetching ? <Spin size="small" /> : null}
>
{getOptions}
</Select>
Expand All @@ -86,7 +86,8 @@ const AddForm: React.FC<IInviteMemberProps & FormComponentProps> = (
{getFieldDecorator(
'needEmail',
{
initialValue: false
initialValue: true,
valuePropName: 'checked'
}
)(<Checkbox>需要被邀请成员邮件确认</Checkbox>)}
</FormItem>
Expand Down
12 changes: 5 additions & 7 deletions webapp/app/containers/Organizations/component/MemberList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export class MemberList extends React.PureComponent<
const { currentOrganization } = this.props
this.MemberForm.validateFieldsAndScroll((err, values) => {
if (!err) {
const { members, needEmail} = values
const { members, needEmail } = values
const orgId = currentOrganization.id
this.props.onInviteMember(orgId, members, needEmail, () => {
this.props.loadOrganizationsMembers(Number(orgId))
Expand Down Expand Up @@ -322,12 +322,10 @@ export class MemberList extends React.PureComponent<
render: (text, record) => {
return (
<span>
<Popover
title="角色列表"
content={this.getContent(record)}
onMouseEnter={this.getRoleList(record)}
>
<a href="javascript:;">获取角色列表</a>
<Popover title="角色列表" content={this.getContent(record)}>
<a href="javascript:;" onMouseEnter={this.getRoleList(record)}>
获取角色列表
</a>
</Popover>
{record?.user?.id !== loginUser.id ? (
currentOrganization?.role === 1 ? (
Expand Down

0 comments on commit fbe935c

Please sign in to comment.