diff --git a/src/components/TeamManagement/TeamManagement.jsx b/src/components/TeamManagement/TeamManagement.jsx index 0697d360e..ccda7a899 100644 --- a/src/components/TeamManagement/TeamManagement.jsx +++ b/src/components/TeamManagement/TeamManagement.jsx @@ -405,7 +405,7 @@ class TeamManagement extends React.Component { isMember={!!currentMember} onCancel={onClickCancel} removeMember={removeMember} - addUsers={onTopcoderInviteSend} + sendInvite={onTopcoderInviteSend} approveOrDecline={onAcceptOrRefuse} projectTeamInvites={projectTeamInvites} topcoderTeamInvites={topcoderTeamInvites} diff --git a/src/components/TeamManagement/TeamManagement.scss b/src/components/TeamManagement/TeamManagement.scss index ec80e7b4f..59c31f0c3 100644 --- a/src/components/TeamManagement/TeamManagement.scss +++ b/src/components/TeamManagement/TeamManagement.scss @@ -414,19 +414,11 @@ height: 200px; } - .topcoder-dialog { - width: 750px; - } - @media screen and (max-width: $screen-md - 1px) { .dialog-body { margin: 0 !important; } - .topcoder-dialog { - width: unset; - } - .project-dialog { width: unset; } diff --git a/src/components/TeamManagement/TopcoderManagementDialog.js b/src/components/TeamManagement/TopcoderManagementDialog.js index 2c06521e8..428e2612f 100644 --- a/src/components/TeamManagement/TopcoderManagementDialog.js +++ b/src/components/TeamManagement/TopcoderManagementDialog.js @@ -1,14 +1,11 @@ import _ from 'lodash' import React from 'react' import PT from 'prop-types' -import cn from 'classnames' import moment from 'moment' import Modal from 'react-modal' import XMarkIcon from '../../assets/icons/icon-x-mark.svg' import Avatar from 'appirio-tech-react-components/components/Avatar/Avatar' import { getAvatarResized, getFullNameWithFallback } from '../../helpers/tcHelpers' -import SelectDropdown from '../SelectDropdown/SelectDropdown' -import Tooltip from 'appirio-tech-react-components/components/Tooltip/Tooltip' import AutocompleteInputContainer from './AutocompleteInputContainer' import { PROJECT_MEMBER_INVITE_STATUS_REQUESTED, PROJECT_MEMBER_INVITE_STATUS_PENDING, @@ -23,58 +20,14 @@ class TopcoderManagementDialog extends React.Component { constructor(props) { super(props) this.state = { - userRole: 'manager', managerType: {}, showAlreadyMemberError: false, errorMessage: null, processingInviteRequestIds: [], // ids of invites for which request is being processed } - this.onUserRoleChange = this.onUserRoleChange.bind(this) - this.handleRoles = this.handleRoles.bind(this) - this.addUsers = this.addUsers.bind(this) this.onChange = this.onChange.bind(this) this.showIndividualErrors = this.showIndividualErrors.bind(this) - - this.roles = [{ - title: 'Manager', - value: 'manager', - }, { - title: 'Observer', - value: 'observer', - }, { - title: 'Account Manager', - value: 'account_manager', - }, { - title: 'Account Executive', - value: 'account_executive', - }, { - title: 'Program Manager', - value: 'program_manager', - }, { - title: 'Solution Architect', - value: 'solution_architect', - }, { - title: 'Project Manager', - value: 'project_manager', - }] - } - - onUserRoleChange(memberId, id, type) { - const managerType = Object.assign({}, this.state.managerType) - managerType[memberId] = type - this.props.changeRole(id, {role: this.roles.find((role) => role.title === type).value}) - this.setState({managerType}) - } - - handleRoles(option) { - this.setState({ - userRole: option.value - }) - } - - addUsers() { - this.props.addUsers(this.state.userRole ) } onChange(selectedMembers) { @@ -142,7 +95,7 @@ class TopcoderManagementDialog extends React.Component { render() { const { members, currentUser, isMember, removeMember, onCancel, removeInvite, approveOrDecline, topcoderTeamInvites = [], - selectedMembers, processingInvites, updatingMemberIds + selectedMembers, processingInvites, } = this.props const { processingInviteRequestIds } = this.state const showRemove = hasPermission(PERMISSIONS.MANAGE_TOPCODER_TEAM) @@ -159,7 +112,7 @@ class TopcoderManagementDialog extends React.Component { contentLabel="" > -