Skip to content

Commit

Permalink
Merge pull request edp963#1768 from ruanhan/dev-0.3
Browse files Browse the repository at this point in the history
feat:(members) edp963#1708
  • Loading branch information
scottsut authored Jun 3, 2020
2 parents 7995f6d + fbe935c commit 684d848
Show file tree
Hide file tree
Showing 9 changed files with 186 additions and 356 deletions.
12 changes: 5 additions & 7 deletions webapp/app/containers/Organizations/Organization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ export class Organization extends React.PureComponent <IOrganizationProps & Rout
}

const mapStateToProps = createStructuredSelector({
starUserList: makeSelectStarUserList(),
loginUser: makeSelectLoginUser(),
starUserList: makeSelectStarUserList(),
organizations: makeSelectOrganizations(),
inviteMemberList: makeSelectInviteMemberList(),
currentOrganization: makeSelectCurrentOrganizations(),
currentOrganizationProjects: makeSelectCurrentOrganizationProjects(),
currentOrganizationProjectsDetail: makeSelectCurrentOrganizationProjectsDetail(),
currentOrganizationMembers: makeSelectCurrentOrganizationMembers(),
inviteMemberList: makeSelectInviteMemberList()
currentOrganizationProjects: makeSelectCurrentOrganizationProjects(),
currentOrganizationProjectsDetail: makeSelectCurrentOrganizationProjectsDetail()
})

export function mapDispatchToProps (dispatch) {
Expand All @@ -178,13 +178,11 @@ export function mapDispatchToProps (dispatch) {
onEditOrganization: (organization) => dispatch(OrganizationActions.editOrganization(organization)),
onDeleteOrganization: (id, resolve) => dispatch(OrganizationActions.deleteOrganization(id, resolve)),
onSearchMember: (keyword) => dispatch(OrganizationActions.searchMember(keyword)),
onInviteMember: (orgId, memId) => dispatch(OrganizationActions.inviteMember(orgId, memId)),
onInviteMember: (orgId, members, needEmail, resolve) => dispatch(OrganizationActions.inviteMember(orgId, members, needEmail, resolve)),
onDeleteOrganizationMember: (id, resolve) => dispatch(OrganizationActions.deleteOrganizationMember(id, resolve)),
onChangeOrganizationMemberRole: (id, role, resolve) => dispatch(OrganizationActions.changeOrganizationMemberRole(id, role, resolve)),
onGetRoleListByMemberId: (orgId, memberId, resolve) => dispatch(OrganizationActions.getRoleListByMemberId(orgId, memberId, resolve))
}


}

const withConnect = connect(mapStateToProps, mapDispatchToProps)
Expand Down
81 changes: 19 additions & 62 deletions webapp/app/containers/Organizations/Team.less
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@
}

.addFormWrapper {
text-align: center;

.titleWrapper {
text-align: center;
.icon{
font-size: 32px;
}
Expand All @@ -132,75 +133,23 @@
}
}
.search {
text-align: center;
margin: 16px 16px 0;
.plusBtn {
border-bottom-right-radius: 4px !important;
border-top-right-radius: 4px !important;
border-right-width: 1px !important;
}
}
}

.searchItems {
width: 65%;
height: auto;
position: absolute;
z-index: 99;
top: 34px;
left: 26px;
// max-height: 21em;
max-height: 322px;
overflow-y: auto;
font-size: 13px;
list-style: none;
background: #fff;
border-radius: 3px;
box-shadow: 0 0 5px rgba(27,31,35,0.3);
.searchLi {
.submit {
display: flex;
min-width: 100%;
padding: 5px 10px;
margin-top: 0;
color: #333;
cursor: pointer;
justify-content: space-between;
align-items: center;
&:hover {
.mainText {
color: #fff;
}
color: #fff;
background-color: @blue;
.create {
color: #fff;
font-weight: 400;
}
}
.main {
.avatar {
height: 36px;
overflow: hidden;
line-height: 1;
vertical-align: middle;
border-radius: 3px;
}
.mainText {
vertical-align: middle;
margin-left: 6px;
font-size: 16px;
font-weight: 600;
.ellipsis;
}
}
.create {
color: @light-text-color;
font-weight: 400;
font-size: 15px;
margin-right: 8px;
}
.iconPlus {
font-size: 18px;
color: #ddd;
justify-content: flex-end;
padding-right: 8px;
margin-top: 32px;
}
:global {
.ant-form-item {
margin-bottom: 4px;
}
}
}
Expand Down Expand Up @@ -308,3 +257,11 @@
justify-content: space-between;
padding-right: 8px;
}

.options {
.email {
margin-left: 4px;
font-size: 12px;
color: @light-text-color;
}
}
6 changes: 4 additions & 2 deletions webapp/app/containers/Organizations/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,14 @@ export const OrganizationActions = {
}
},

inviteMember (orgId, memId) {
inviteMember (orgId, members, needEmail, resolve) {
return {
type: ActionTypes.INVITE_MEMBER,
payload: {
orgId,
memId
members,
needEmail,
resolve
}
}
},
Expand Down
Loading

0 comments on commit 684d848

Please sign in to comment.