From 288047a8a1966d212570146989244bbd3feeac68 Mon Sep 17 00:00:00 2001 From: iversonLv Date: Thu, 16 Apr 2020 02:02:43 +0800 Subject: [PATCH 01/39] =?UTF-8?q?issues=5F3770=20Profile=20Icon=20doesn?= =?UTF-8?q?=E2=80=99t=20display=20the=20default=20image=20in=20Avatar.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../profile/components/ProfileSettingsAvatar.jsx | 15 ++++++++++----- .../profile/components/ProfileSettingsAvatar.scss | 8 ++++++++ .../profile/components/ProfileSettingsForm.jsx | 2 ++ .../containers/ProfileSettingsContainer.jsx | 1 + 4 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx b/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx index 409044157..8ef95320d 100644 --- a/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx +++ b/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx @@ -4,7 +4,8 @@ import React from 'react' import PropTypes from 'prop-types' import FileBtn from '../../../../../components/FileBtn/FileBtn' -import { getAvatarResized } from '../../../../..//helpers/tcHelpers' +import Avatar from 'appirio-tech-react-components/components/Avatar/Avatar' +import { getFullNameWithFallback, getAvatarResized } from '../../../../..//helpers/tcHelpers' import './ProfileSettingsAvatar.scss' class ProfileSettingsAvatar extends React.Component { @@ -22,11 +23,15 @@ class ProfileSettingsAvatar extends React.Component { } render() { - const { photoUrl, isUploading } = this.props + console.log(this.props) + const { isUploading, user } = this.props + const userName = getFullNameWithFallback(user) const label = isUploading ? 'Uploading, please wait' : 'Upload a new photo' return (
- +
+ +
Avatar
Date: Thu, 16 Apr 2020 02:14:00 +0800 Subject: [PATCH 02/39] issues_3775 User is able to click on the tabs that are already selected. --- src/components/StatusFilters/StatusFilters.scss | 3 +++ src/components/StatusFilters/StatusFiltersList.jsx | 2 +- src/components/StatusFilters/StatusFiltersMobile.jsx | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/StatusFilters/StatusFilters.scss b/src/components/StatusFilters/StatusFilters.scss index 89f4388b5..0e4d8f7a2 100644 --- a/src/components/StatusFilters/StatusFilters.scss +++ b/src/components/StatusFilters/StatusFilters.scss @@ -53,4 +53,7 @@ border-radius: 6px; box-shadow: 0px 1px 3px 0px $tc-gray-30; } + &.active { + cursor: default; + } } diff --git a/src/components/StatusFilters/StatusFiltersList.jsx b/src/components/StatusFilters/StatusFiltersList.jsx index 721f14e78..de29f6559 100644 --- a/src/components/StatusFilters/StatusFiltersList.jsx +++ b/src/components/StatusFilters/StatusFiltersList.jsx @@ -13,7 +13,7 @@ const StatusFiltersList = ({ statuses, currentStatus, onStatusClick }) => (
  • onStatusClick(status.val)} + onClick={() => status.val !== currentStatus ? onStatusClick(status.val) : ''} > {status.label}
  • diff --git a/src/components/StatusFilters/StatusFiltersMobile.jsx b/src/components/StatusFilters/StatusFiltersMobile.jsx index defacbe44..227b2f1a1 100644 --- a/src/components/StatusFilters/StatusFiltersMobile.jsx +++ b/src/components/StatusFilters/StatusFiltersMobile.jsx @@ -55,7 +55,7 @@ class StatusFiltersMobile extends React.Component {
  • this.onStatusClick(status.val)} + onClick={() => status.val !== currentStatus ? this.onStatusClick(status.val) : ''} > {status.label}
  • From 52cc9760968059982036abf1fee9d2a0c0992d1f Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Thu, 16 Apr 2020 00:36:46 +0530 Subject: [PATCH 03/39] issue 3825 --- src/projects/actions/projectMember.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/projects/actions/projectMember.js b/src/projects/actions/projectMember.js index 3c96e492b..a9556e9f0 100644 --- a/src/projects/actions/projectMember.js +++ b/src/projects/actions/projectMember.js @@ -83,7 +83,13 @@ export function removeProjectMember(projectId, memberId, isUserLeaving) { return (dispatch) => { return dispatch({ type: REMOVE_PROJECT_MEMBER, - payload: removeMember(projectId, memberId), + payload: removeMember(projectId, memberId).then(response => + // we have to add delay before applying the result of removing a project member + // (only if the current user is leaving and not when a different user is removed) + // as it takes some time for the update to be reindexed in ES so the new state is reflected + // everywhere + isUserLeaving ? delay(ES_REINDEX_DELAY).then(() => response) : response + ), meta: { isUserLeaving } }) } From 579cff06b948a6b345182fa5d644542c65f06481 Mon Sep 17 00:00:00 2001 From: abdullatku Date: Thu, 16 Apr 2020 02:20:04 +0530 Subject: [PATCH 04/39] Observer role fixed --- src/components/TeamManagement/TopcoderManagementDialog.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/TeamManagement/TopcoderManagementDialog.js b/src/components/TeamManagement/TopcoderManagementDialog.js index fb98bb868..4c4121604 100644 --- a/src/components/TeamManagement/TopcoderManagementDialog.js +++ b/src/components/TeamManagement/TopcoderManagementDialog.js @@ -212,8 +212,9 @@ class TopcoderManagementDialog extends React.Component {
    ) } - const types = ['Observer', 'Copilot', 'Manager', 'Account Manager', 'Account Executive', 'Program Manager', 'Solution Architect', 'Project Manager'] + let types = ['Copilot', 'Manager', 'Account Manager', 'Account Executive', 'Program Manager', 'Solution Architect', 'Project Manager'] const currentType = role + types = currentType === 'Observer'? ['Observer', ...types] : [...types] const onClick = (type) => { this.onUserRoleChange(member.userId, member.id, type) } @@ -360,7 +361,7 @@ class TopcoderManagementDialog extends React.Component { name="role" value={this.state.userRole} theme="role-drop-down default" - options={this.roles} + options={this.roles.filter(role => role.title !== 'Observer')} onSelect={this.handleRoles} /> From 3593ca2dc5e02ea2a3284ed492273b11d783cb59 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Thu, 16 Apr 2020 03:07:56 +0530 Subject: [PATCH 05/39] issue 3468 --- src/projects/actions/projectMember.js | 17 +++++------------ .../containers/TeamManagementContainer.jsx | 3 --- src/projects/reducers/project.js | 10 ++++++++++ 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/projects/actions/projectMember.js b/src/projects/actions/projectMember.js index 3c96e492b..e703c8102 100644 --- a/src/projects/actions/projectMember.js +++ b/src/projects/actions/projectMember.js @@ -1,13 +1,13 @@ import { addProjectMember as addMember, removeProjectMember as removeMember, updateProjectMember as updateMember, - loadMemberSuggestions as loadMemberSuggestionsAPI + loadMemberSuggestions as loadMemberSuggestionsAPI, } from '../../api/projectMembers' import { createProjectMemberInvite as createProjectMemberInvite, updateProjectMemberInvite as updateProjectMemberInvite, deleteProjectMemberInvite as deleteProjectMemberInvite, } from '../../api/projectMemberInvites' -import { loadProjectMember, loadProjectMembers, loadProjectMemberInvites } from './project' +import { loadProjectMember, loadProjectMembers } from './project' import {ADD_PROJECT_MEMBER, REMOVE_PROJECT_MEMBER, UPDATE_PROJECT_MEMBER, LOAD_MEMBER_SUGGESTIONS, @@ -157,20 +157,13 @@ export function acceptOrRefuseInvite(projectId, item, currentUser) { const inviteId = item.id ? item.id : projectState.userInvitationId return dispatch({ type: ACCEPT_OR_REFUSE_INVITE, - payload: updateProjectMemberInvite(projectId, inviteId, item.status).then((response) => + payload: updateProjectMemberInvite(projectId, inviteId, item.status).then(() => // we have to add delay before applying the result of accepting/declining invitation // as it takes some time for the update to be reindexed in ES so the new state is reflected // everywhere - delay(ES_REINDEX_DELAY).then(() => response) + delay(ES_REINDEX_DELAY).then(() => dispatch(loadProjectMembers(projectId))) ), - meta: { projectId, currentUser }, + meta: { projectId, inviteId, currentUser }, }) } } - -export function reloadProjectMembers(projectId) { - return (dispatch) => Promise.all([ - dispatch(loadProjectMembers(projectId)), - dispatch(loadProjectMemberInvites(projectId)) - ]) -} diff --git a/src/projects/detail/containers/TeamManagementContainer.jsx b/src/projects/detail/containers/TeamManagementContainer.jsx index d38e1aa15..88b2805bb 100644 --- a/src/projects/detail/containers/TeamManagementContainer.jsx +++ b/src/projects/detail/containers/TeamManagementContainer.jsx @@ -26,7 +26,6 @@ import { import TeamManagement from '../../../components/TeamManagement/TeamManagement' import { acceptOrRefuseInvite, - reloadProjectMembers, addProjectMember, deleteProjectInvite, deleteTopcoderMemberInvite, @@ -119,7 +118,6 @@ class TeamManagementContainer extends Component { onAcceptOrRefuse(invite) { return this.props.acceptOrRefuseInvite(this.props.projectId, invite) - .then(() => this.props.reloadProjectMembers(this.props.projectId)) } changeRole(memberId, item) { @@ -253,7 +251,6 @@ const mapDispatchToProps = { inviteTopcoderMembers, deleteTopcoderMemberInvite, acceptOrRefuseInvite, - reloadProjectMembers, loadProjects, } diff --git a/src/projects/reducers/project.js b/src/projects/reducers/project.js index 9f51a2b69..bbd845d34 100644 --- a/src/projects/reducers/project.js +++ b/src/projects/reducers/project.js @@ -232,9 +232,19 @@ export const projectState = function (state=initialState, action) { }) case ACCEPT_OR_REFUSE_INVITE_SUCCESS: { + const { inviteId } = action.meta + const invites = _.filter(state.project.invites, m => m.id !== inviteId) return Object.assign({}, state, { showUserInvited: false, inviteError: false, + project: { + ...state.project, + invites + }, + projectNonDirty: { + ...state.projectNonDirty, + invites + } }) } From bf5334933e357f4f664fba9e106c7be3c46dc429 Mon Sep 17 00:00:00 2001 From: Samuel Barboza Date: Wed, 15 Apr 2020 17:28:48 -0600 Subject: [PATCH 06/39] Hidden top bar buttons fix --- src/projects/detail/containers/ProjectAddPhaseContainer.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/projects/detail/containers/ProjectAddPhaseContainer.scss b/src/projects/detail/containers/ProjectAddPhaseContainer.scss index 58d7f8a2f..29c01dc9a 100644 --- a/src/projects/detail/containers/ProjectAddPhaseContainer.scss +++ b/src/projects/detail/containers/ProjectAddPhaseContainer.scss @@ -4,7 +4,7 @@ // as block in this component comes inside Layout component // we have to additionally remove padding at the top added by Layout // to make Wizard properly fullscreen - margin-top: -110px; + margin-top: -60px; @media screen and (max-width: $screen-md - 1px) { margin-top: 0; From 2a912f3da0a2c0c6c3b05296a12a6b409652e531 Mon Sep 17 00:00:00 2001 From: Vips19 Date: Thu, 16 Apr 2020 13:26:00 +0530 Subject: [PATCH 07/39] fix issue-3835 --- src/components/AssetsLibrary/GridView.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/AssetsLibrary/GridView.scss b/src/components/AssetsLibrary/GridView.scss index 48c203f99..8717eeafb 100644 --- a/src/components/AssetsLibrary/GridView.scss +++ b/src/components/AssetsLibrary/GridView.scss @@ -133,7 +133,7 @@ .delete-confirmation-modal { position: relative; - z-index: 20; + z-index: 15; } .hand { From 38243cb78fc2466fd512926d781762247fdd7908 Mon Sep 17 00:00:00 2001 From: sr_jr Date: Thu, 16 Apr 2020 14:09:02 +0530 Subject: [PATCH 08/39] fix for issue #3774 --- src/config/permissions.js | 15 ++++++++++++++- .../components/Projects/ProjectListNavHeader.jsx | 6 ++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/config/permissions.js b/src/config/permissions.js index 0939d566e..25a00ee85 100644 --- a/src/config/permissions.js +++ b/src/config/permissions.js @@ -72,6 +72,7 @@ import { ROLE_SOLUTION_ARCHITECT, ROLE_PROJECT_MANAGER, ROLE_CONNECT_COPILOT, + ROLE_CONNECT_COPILOT_MANAGER, } from './constants' /* eslint-enable no-unused-vars */ @@ -140,7 +141,7 @@ const PROJECT_NON_CUSTOMER_MEMBERS = [ * The next sets of roles are exported for outside usage with `hasPermission` method. */ -export default { +export default { MANAGE_PROJECT_PLAN: { _meta: { group: 'Project Plan', @@ -279,6 +280,18 @@ export default { ], }, + SEE_MY_PROJECTS_FILTER: { + _meta: { + group: 'My Projects Filter', + title: 'My Projects Filter', + }, + allowRule: { + topcoderRoles: [ + ..._.difference(TOPCODER_ALL, [ROLE_CONNECT_COPILOT, ROLE_TOPCODER_USER]) + ] + } + }, + /* DEMO RULES diff --git a/src/projects/list/components/Projects/ProjectListNavHeader.jsx b/src/projects/list/components/Projects/ProjectListNavHeader.jsx index c75897dec..dc3531389 100644 --- a/src/projects/list/components/Projects/ProjectListNavHeader.jsx +++ b/src/projects/list/components/Projects/ProjectListNavHeader.jsx @@ -12,6 +12,8 @@ import CardView from '../../../../assets/icons/ui-16px-2_grid-45-gray.svg' import GridView from '../../../../assets/icons/grid-list-ico.svg' import { SwitchButton } from 'appirio-tech-react-components' +import PERMISSIONS from '../../../../config/permissions' +import { hasPermission } from '../../../../helpers/permissions' export default class ProjectListNavHeader extends Component { @@ -87,7 +89,7 @@ export default class ProjectListNavHeader extends Component { ) )} - {(!this.props.isCustomer) && + {hasPermission(PERMISSIONS.SEE_MY_PROJECTS_FILTER) &&
    - {!this.props.isCustomer && ( + {hasPermission(PERMISSIONS.SEE_MY_PROJECTS_FILTER) && (
    Date: Thu, 16 Apr 2020 14:11:21 +0530 Subject: [PATCH 09/39] fix for issue #3774 --- src/config/permissions.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/config/permissions.js b/src/config/permissions.js index 25a00ee85..56b63f41d 100644 --- a/src/config/permissions.js +++ b/src/config/permissions.js @@ -72,7 +72,6 @@ import { ROLE_SOLUTION_ARCHITECT, ROLE_PROJECT_MANAGER, ROLE_CONNECT_COPILOT, - ROLE_CONNECT_COPILOT_MANAGER, } from './constants' /* eslint-enable no-unused-vars */ From c0af95ee212e101baabf6f00ece89a8020fb0856 Mon Sep 17 00:00:00 2001 From: sr_jr Date: Thu, 16 Apr 2020 14:11:53 +0530 Subject: [PATCH 10/39] fix for issue #3774 --- src/config/permissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/config/permissions.js b/src/config/permissions.js index 56b63f41d..6f6083951 100644 --- a/src/config/permissions.js +++ b/src/config/permissions.js @@ -140,7 +140,7 @@ const PROJECT_NON_CUSTOMER_MEMBERS = [ * The next sets of roles are exported for outside usage with `hasPermission` method. */ -export default { +export default { MANAGE_PROJECT_PLAN: { _meta: { group: 'Project Plan', From 2aa146fb7176924d747bae3d8049b38f9a55746f Mon Sep 17 00:00:00 2001 From: Nahid Mahbub Date: Thu, 16 Apr 2020 14:54:56 +0600 Subject: [PATCH 11/39] showing ellipsis ... at the end --- src/components/TeamManagement/TeamManagement.scss | 3 +++ src/components/User/UserTooltip.scss | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/src/components/TeamManagement/TeamManagement.scss b/src/components/TeamManagement/TeamManagement.scss index 7b17d13db..e1f48debb 100644 --- a/src/components/TeamManagement/TeamManagement.scss +++ b/src/components/TeamManagement/TeamManagement.scss @@ -326,6 +326,9 @@ font-size: $tc-label-sm; color: $tc-dark-blue; display: block; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; > span { display: block; diff --git a/src/components/User/UserTooltip.scss b/src/components/User/UserTooltip.scss index e94fcb192..1ea8d75d4 100644 --- a/src/components/User/UserTooltip.scss +++ b/src/components/User/UserTooltip.scss @@ -127,6 +127,7 @@ flex-wrap: wrap; align-content: flex-start; position: relative; + width: 80%; } .user-name-container { @@ -158,6 +159,10 @@ .user-email-container { flex: 1; padding-left: 10px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + max-width: 80%; a { font-size: 12px; From fbc994349f89bcf321b4e836d0aa98b7b5130105 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Thu, 16 Apr 2020 14:33:48 +0530 Subject: [PATCH 12/39] issue 3841 --- src/projects/reducers/projectTopics.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/projects/reducers/projectTopics.js b/src/projects/reducers/projectTopics.js index d239330ee..9a5e02df2 100644 --- a/src/projects/reducers/projectTopics.js +++ b/src/projects/reducers/projectTopics.js @@ -510,6 +510,7 @@ export const projectTopics = function (state=initialState, action) { rawContent: { $set : rawContent }, body: { $set : savedComment.body }, attachments: { $set : savedComment.attachments }, + links: { $set: getLinksFromPost(savedComment.rawContent) }, updatedDate: { $set : savedComment.updatedDate }, edited: {$set : true } }) From 365a850c3b48e5366684cc8a58d255164ca6ba1c Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Thu, 16 Apr 2020 15:01:14 +0530 Subject: [PATCH 13/39] issue 3884 --- src/components/ProjectInfo/ProjectInfo.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ProjectInfo/ProjectInfo.scss b/src/components/ProjectInfo/ProjectInfo.scss index 2e82430db..5aa4f3a5e 100644 --- a/src/components/ProjectInfo/ProjectInfo.scss +++ b/src/components/ProjectInfo/ProjectInfo.scss @@ -129,6 +129,7 @@ .tooltip-target-container { flex: 1; width: 0; + min-width: 0; display: flex; justify-content: flex-end; From 13e2b11cdeafc4a4873ad001b8a3c41e43c71db0 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Thu, 16 Apr 2020 15:13:01 +0530 Subject: [PATCH 14/39] wrap ref code tooltip --- src/components/ProjectInfo/ProjectInfo.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/ProjectInfo/ProjectInfo.scss b/src/components/ProjectInfo/ProjectInfo.scss index 5aa4f3a5e..991089004 100644 --- a/src/components/ProjectInfo/ProjectInfo.scss +++ b/src/components/ProjectInfo/ProjectInfo.scss @@ -146,6 +146,7 @@ white-space: normal; display: flex; justify-content: center; + word-break: break-word; } } } From 58597eb53ca6ce11d50f85e1c5ce37d11d417df1 Mon Sep 17 00:00:00 2001 From: abdullatku Date: Thu, 16 Apr 2020 20:38:59 +0530 Subject: [PATCH 15/39] issue 3816 fixed --- .../SkillsQuestion/SkillsQuestionBase.jsx | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx b/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx index 0bb34e060..a24256b9c 100644 --- a/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx +++ b/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx @@ -128,6 +128,13 @@ class SkillsQuestion extends React.PureComponent { onSelectType(value) { const { getValue } = this.props + const { availableOptions } = this.state + const isInAvailableOptions = _.some(availableOptions, option => { + return option && option.name.trim().toLowerCase() === value.replace(';', '').trim().toLowerCase(); + }) + const correspondingOption = availableOptions.find(option => { + return option.name.trim().toLowerCase()===value.replace(';', '').trim().toLowerCase() + }); const indexOfSpace = value.indexOf(' ') const indexOfSemiColon = value.indexOf(';') @@ -135,12 +142,16 @@ class SkillsQuestion extends React.PureComponent { if (indexOfSpace === 0 || indexOfSemiColon === 0 ) { return value.slice(1) } - if (indexOfSemiColon >= 1 ) { const newValue = value.replace(';', '').trim() const currentValues = getValue() - if (!_.some(currentValues, v => v && v.name === newValue)) { - this.handleChange([...currentValues, { name: newValue}]) + if (!_.some(currentValues, v => v && v.name.trim().toLowerCase() === newValue.trim().toLowerCase())) { + if(isInAvailableOptions) { + this.handleChange([...currentValues, correspondingOption]) + this.setState({ customOptionValue: '' }) + } else { + this.handleChange([...currentValues, { name: newValue}]) + } // this is return empty to nullify value post processing return '' } else { @@ -148,8 +159,9 @@ class SkillsQuestion extends React.PureComponent { return value.replace(';', '') } } - - this.setState({ customOptionValue: value }) + if (!isInAvailableOptions) { + this.setState({ customOptionValue: value }) + } } render() { @@ -216,6 +228,7 @@ class SkillsQuestion extends React.PureComponent { noOptionsMessage={() => 'No results found'} options={selectGroupOptions} isDisabled={questionDisabled} + />
    { hasError && (

    {errorMessage}

    ) } From 7cfb56469f9995eb2219b1cb4365f9a4fa0647f8 Mon Sep 17 00:00:00 2001 From: Romit Choudhary Date: Thu, 16 Apr 2020 21:50:44 +0530 Subject: [PATCH 16/39] added permission check for showing member suggestions --- .../AutocompleteInputContainer.jsx | 109 ++++++++++-------- .../TeamManagement/ProjectManagementDialog.js | 5 + .../TopcoderManagementDialog.js | 2 + src/config/permissions.js | 15 +++ 4 files changed, 82 insertions(+), 49 deletions(-) diff --git a/src/components/TeamManagement/AutocompleteInputContainer.jsx b/src/components/TeamManagement/AutocompleteInputContainer.jsx index db200e09d..061d5dea5 100644 --- a/src/components/TeamManagement/AutocompleteInputContainer.jsx +++ b/src/components/TeamManagement/AutocompleteInputContainer.jsx @@ -1,80 +1,84 @@ -import React from 'react' -import { connect } from 'react-redux' -import _ from 'lodash' +import React from "react"; +import { connect } from "react-redux"; +import _ from "lodash"; -import AutocompleteInput from './AutocompleteInput' -import {memberSuggestionsDispatch, clearMemberSuggestions} from '../../projects/actions/projectMember' -import {AUTOCOMPLETE_TRIGGER_LENGTH} from '../../config/constants' +import AutocompleteInput from "./AutocompleteInput"; +import { + memberSuggestionsDispatch, + clearMemberSuggestions, +} from "../../projects/actions/projectMember"; +import { AUTOCOMPLETE_TRIGGER_LENGTH } from "../../config/constants"; class AutocompleteInputContainer extends React.Component { - constructor(props) { - super(props) - this.debounceTimer = null + super(props); + this.debounceTimer = null; - this.clearUserSuggestions = this.clearUserSuggestions.bind(this) + this.clearUserSuggestions = this.clearUserSuggestions.bind(this); } /** * Clear user suggestion list */ clearUserSuggestions() { - const { currentUser } = this.props + const { currentUser } = this.props; if (!currentUser.isCustomer) { // When customer user is typing a user handle to invite we should not try to clear suggestions, // because we don't show suggestions for customer - this.props.onClearUserSuggestions() + this.props.onClearUserSuggestions(); } } onInputChange(inputValue) { - const { currentUser } = this.props - const indexOfSpace = inputValue.indexOf(' ') - const indexOfSemiColon = inputValue.indexOf(';') + const { currentUser } = this.props; + const indexOfSpace = inputValue.indexOf(" "); + const indexOfSemiColon = inputValue.indexOf(";"); // if user enter only ' ' or ';' we should clean it to not allow - if (indexOfSpace === 0 || indexOfSemiColon === 0 ) { - return '' + if (indexOfSpace === 0 || indexOfSemiColon === 0) { + return ""; } - if (indexOfSpace >= 1 || indexOfSemiColon >= 1 ) { - inputValue = inputValue.substring(0, inputValue.length -1 ) - this.onUpdate([...this.props.selectedMembers, {label: inputValue, value: inputValue}]) - this.clearUserSuggestions() + if (indexOfSpace >= 1 || indexOfSemiColon >= 1) { + inputValue = inputValue.substring(0, inputValue.length - 1); + this.onUpdate([ + ...this.props.selectedMembers, + { label: inputValue, value: inputValue }, + ]); + this.clearUserSuggestions(); // this is return empty to nullify inputValue post processing - return '' + return ""; } if (inputValue.length >= AUTOCOMPLETE_TRIGGER_LENGTH) { // When customer user is typing a user handle to invite we should not try to show suggestions as we always get error 403 - if (!currentUser.isCustomer) { - this.props.onLoadUserSuggestions(inputValue) + if (this.props.showSuggestions) { + this.props.onLoadUserSuggestions(inputValue); } } else { - this.clearUserSuggestions() + this.clearUserSuggestions(); } } onUpdate(inputValue) { - const inputValueNormalized = inputValue.map(value => ({ + const inputValueNormalized = inputValue.map((value) => ({ ...value, - isEmail: (/(.+)@(.+){2,}\.(.+){2,}/).test(value.label) - })) + isEmail: /(.+)@(.+){2,}\.(.+){2,}/.test(value.label), + })); if (this.props.onUpdate) { - this.props.onUpdate(inputValueNormalized) + this.props.onUpdate(inputValueNormalized); } - this.clearUserSuggestions() + this.clearUserSuggestions(); } render() { - - const { placeholder, currentUser, selectedMembers, disabled } = this.props + const { placeholder, currentUser, selectedMembers, disabled } = this.props; return ( - ) + ); } } const mapStateToProps = (reduxstore) => { return { - suggestedMembers: reduxstore.members.suggestedMembers - .map(suggestion => { - return { - label: suggestion.handle, value: suggestion.handle - } - }) - } -} + suggestedMembers: reduxstore.members.suggestedMembers.map((suggestion) => { + return { + label: suggestion.handle, + value: suggestion.handle, + }; + }), + }; +}; const mapDispatchToProps = (dispatch) => { - const debouncedDispatcher = _.debounce((arg) => memberSuggestionsDispatch(dispatch)(arg), 500, {leading: true}) + const debouncedDispatcher = _.debounce( + (arg) => memberSuggestionsDispatch(dispatch)(arg), + 500, + { leading: true } + ); return { onLoadUserSuggestions: (value) => { - debouncedDispatcher(value) + debouncedDispatcher(value); }, onClearUserSuggestions: () => { - clearMemberSuggestions(dispatch) - } - } -} + clearMemberSuggestions(dispatch); + }, + }; +}; -export default connect(mapStateToProps, mapDispatchToProps)(AutocompleteInputContainer) +export default connect( + mapStateToProps, + mapDispatchToProps +)(AutocompleteInputContainer); diff --git a/src/components/TeamManagement/ProjectManagementDialog.js b/src/components/TeamManagement/ProjectManagementDialog.js index bb842f600..17ffab12c 100644 --- a/src/components/TeamManagement/ProjectManagementDialog.js +++ b/src/components/TeamManagement/ProjectManagementDialog.js @@ -5,6 +5,9 @@ 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 PERMISSIONS from "../../config/permissions"; + +import { hasPermission } from "../../helpers/permissions"; import {getAvatarResized, getFullNameWithFallback} from '../../helpers/tcHelpers' import { compareEmail, compareHandles } from '../../helpers/utils' import AutocompleteInputContainer from './AutocompleteInputContainer' @@ -88,6 +91,7 @@ class ProjectManagementDialog extends React.Component { onCancel, projectTeamInvites = [], selectedMembers, processingInvites, } = this.props const showRemove = currentUser.isAdmin || (!currentUser.isCopilot && isMember) + const showSuggestions = hasPermission(PERMISSIONS.SEE_MEMBER_SUGGESTIONS); let i = 0 return ( {this.state.showAlreadyMemberError &&
    Project Member(s) can't be invited again. Please remove them from list. diff --git a/src/components/TeamManagement/TopcoderManagementDialog.js b/src/components/TeamManagement/TopcoderManagementDialog.js index fb98bb868..e388772ac 100644 --- a/src/components/TeamManagement/TopcoderManagementDialog.js +++ b/src/components/TeamManagement/TopcoderManagementDialog.js @@ -147,6 +147,7 @@ class TopcoderManagementDialog extends React.Component { const { processingInviteRequestIds } = this.state const showRemove = hasPermission(PERMISSIONS.MANAGE_TOPCODER_TEAM) const showApproveDecline = currentUser.isAdmin || currentUser.isCopilotManager + const showSuggestions = hasPermission(PERMISSIONS.SEE_MEMBER_SUGGESTIONS); let i = 0 return ( @@ -351,6 +352,7 @@ class TopcoderManagementDialog extends React.Component { currentUser={currentUser} selectedMembers={selectedMembers} disabled={processingInvites || (!currentUser.isAdmin && !isMember && !currentUser.isCopilotManager)} + showSuggestions={showSuggestions} /> { this.state.showAlreadyMemberError &&
    Project Member(s) can\'t be invited again. Please remove them from list. diff --git a/src/config/permissions.js b/src/config/permissions.js index 0939d566e..55d20c61c 100644 --- a/src/config/permissions.js +++ b/src/config/permissions.js @@ -72,6 +72,7 @@ import { ROLE_SOLUTION_ARCHITECT, ROLE_PROJECT_MANAGER, ROLE_CONNECT_COPILOT, + ROLE_CONNECT_COPILOT_MANAGER, } from './constants' /* eslint-enable no-unused-vars */ @@ -279,6 +280,20 @@ export default { ], }, + SEE_MEMBER_SUGGESTIONS: { + _meta: { + group: 'View Member Suggestions', + title: 'Member Suggestions' + }, + topcoderRoles: [ + ROLE_ADMINISTRATOR, + ROLE_CONNECT_ADMIN, + ROLE_CONNECT_MANAGER, + ROLE_CONNECT_ACCOUNT_MANAGER, + ROLE_CONNECT_COPILOT_MANAGER + ], + }, + /* DEMO RULES From f63b468fbf94312bafa67cd256f8950576168247 Mon Sep 17 00:00:00 2001 From: Romit Choudhary Date: Thu, 16 Apr 2020 21:57:55 +0530 Subject: [PATCH 17/39] added permission check for showing member suggestions --- docs/permissions.html | 19 +++++ .../AutocompleteInputContainer.jsx | 71 +++++++++---------- .../TeamManagement/ProjectManagementDialog.js | 6 +- .../TopcoderManagementDialog.js | 2 +- 4 files changed, 58 insertions(+), 40 deletions(-) diff --git a/docs/permissions.html b/docs/permissions.html index f75b4b6b1..92836fbe2 100644 --- a/docs/permissions.html +++ b/docs/permissions.html @@ -206,6 +206,25 @@

    User Profile

    Project Manager
    +
    +
    +

    View Member Suggestions

    +
    +
    +
    +
    + Member Suggestions +
    SEE_MEMBER_SUGGESTIONS
    +
    +
    +
    + administrator + Connect Admin + Connect Manager + Connect Account Manager + Connect Copilot Manager +
    +

    DEMO/TEST example permissions

    diff --git a/src/components/TeamManagement/AutocompleteInputContainer.jsx b/src/components/TeamManagement/AutocompleteInputContainer.jsx index 061d5dea5..87d87d0ae 100644 --- a/src/components/TeamManagement/AutocompleteInputContainer.jsx +++ b/src/components/TeamManagement/AutocompleteInputContainer.jsx @@ -1,63 +1,62 @@ -import React from "react"; -import { connect } from "react-redux"; -import _ from "lodash"; +import React from 'react' +import { connect } from 'react-redux' +import _ from 'lodash' -import AutocompleteInput from "./AutocompleteInput"; +import AutocompleteInput from './AutocompleteInput' import { memberSuggestionsDispatch, clearMemberSuggestions, -} from "../../projects/actions/projectMember"; -import { AUTOCOMPLETE_TRIGGER_LENGTH } from "../../config/constants"; +} from '../../projects/actions/projectMember' +import { AUTOCOMPLETE_TRIGGER_LENGTH } from '../../config/constants' class AutocompleteInputContainer extends React.Component { constructor(props) { - super(props); - this.debounceTimer = null; + super(props) + this.debounceTimer = null - this.clearUserSuggestions = this.clearUserSuggestions.bind(this); + this.clearUserSuggestions = this.clearUserSuggestions.bind(this) } /** * Clear user suggestion list */ clearUserSuggestions() { - const { currentUser } = this.props; + const { currentUser } = this.props if (!currentUser.isCustomer) { // When customer user is typing a user handle to invite we should not try to clear suggestions, // because we don't show suggestions for customer - this.props.onClearUserSuggestions(); + this.props.onClearUserSuggestions() } } onInputChange(inputValue) { - const { currentUser } = this.props; - const indexOfSpace = inputValue.indexOf(" "); - const indexOfSemiColon = inputValue.indexOf(";"); + const indexOfSpace = inputValue.indexOf(' ') + const indexOfSemiColon = inputValue.indexOf(';') // if user enter only ' ' or ';' we should clean it to not allow if (indexOfSpace === 0 || indexOfSemiColon === 0) { - return ""; + return '' } if (indexOfSpace >= 1 || indexOfSemiColon >= 1) { - inputValue = inputValue.substring(0, inputValue.length - 1); + inputValue = inputValue.substring(0, inputValue.length - 1) this.onUpdate([ ...this.props.selectedMembers, { label: inputValue, value: inputValue }, - ]); - this.clearUserSuggestions(); + ]) + this.clearUserSuggestions() // this is return empty to nullify inputValue post processing - return ""; + return '' } if (inputValue.length >= AUTOCOMPLETE_TRIGGER_LENGTH) { // When customer user is typing a user handle to invite we should not try to show suggestions as we always get error 403 if (this.props.showSuggestions) { - this.props.onLoadUserSuggestions(inputValue); + this.props.onLoadUserSuggestions(inputValue) } } else { - this.clearUserSuggestions(); + this.clearUserSuggestions() } } @@ -65,20 +64,20 @@ class AutocompleteInputContainer extends React.Component { const inputValueNormalized = inputValue.map((value) => ({ ...value, isEmail: /(.+)@(.+){2,}\.(.+){2,}/.test(value.label), - })); + })) if (this.props.onUpdate) { - this.props.onUpdate(inputValueNormalized); + this.props.onUpdate(inputValueNormalized) } - this.clearUserSuggestions(); + this.clearUserSuggestions() } render() { - const { placeholder, currentUser, selectedMembers, disabled } = this.props; + const { placeholder, currentUser, selectedMembers, disabled } = this.props return ( - ); + ) } } @@ -96,28 +95,28 @@ const mapStateToProps = (reduxstore) => { return { label: suggestion.handle, value: suggestion.handle, - }; + } }), - }; -}; + } +} const mapDispatchToProps = (dispatch) => { const debouncedDispatcher = _.debounce( (arg) => memberSuggestionsDispatch(dispatch)(arg), 500, { leading: true } - ); + ) return { onLoadUserSuggestions: (value) => { - debouncedDispatcher(value); + debouncedDispatcher(value) }, onClearUserSuggestions: () => { - clearMemberSuggestions(dispatch); + clearMemberSuggestions(dispatch) }, - }; -}; + } +} export default connect( mapStateToProps, mapDispatchToProps -)(AutocompleteInputContainer); +)(AutocompleteInputContainer) diff --git a/src/components/TeamManagement/ProjectManagementDialog.js b/src/components/TeamManagement/ProjectManagementDialog.js index 17ffab12c..6cc49abea 100644 --- a/src/components/TeamManagement/ProjectManagementDialog.js +++ b/src/components/TeamManagement/ProjectManagementDialog.js @@ -5,9 +5,9 @@ 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 PERMISSIONS from "../../config/permissions"; +import PERMISSIONS from '../../config/permissions' -import { hasPermission } from "../../helpers/permissions"; +import { hasPermission } from '../../helpers/permissions' import {getAvatarResized, getFullNameWithFallback} from '../../helpers/tcHelpers' import { compareEmail, compareHandles } from '../../helpers/utils' import AutocompleteInputContainer from './AutocompleteInputContainer' @@ -91,7 +91,7 @@ class ProjectManagementDialog extends React.Component { onCancel, projectTeamInvites = [], selectedMembers, processingInvites, } = this.props const showRemove = currentUser.isAdmin || (!currentUser.isCopilot && isMember) - const showSuggestions = hasPermission(PERMISSIONS.SEE_MEMBER_SUGGESTIONS); + const showSuggestions = hasPermission(PERMISSIONS.SEE_MEMBER_SUGGESTIONS) let i = 0 return ( Date: Thu, 16 Apr 2020 23:43:05 +0530 Subject: [PATCH 18/39] Issue #3843 fixed --- src/projects/list/components/Projects/ProjectsGridView.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/projects/list/components/Projects/ProjectsGridView.scss b/src/projects/list/components/Projects/ProjectsGridView.scss index 52bf2500d..c36b90c2e 100644 --- a/src/projects/list/components/Projects/ProjectsGridView.scss +++ b/src/projects/list/components/Projects/ProjectsGridView.scss @@ -83,6 +83,7 @@ $screen-one-column: 720px; } .item-manager { + z-index: 0; flex: 2 2 105px; min-width: 105px; .spacing { @@ -366,6 +367,7 @@ $screen-one-column: 720px; } .item-customer { + z-index: 0; padding-left: 10px; align-items: center; From 8cf8d854136f626deff5b609a5eaf4ab33845bf6 Mon Sep 17 00:00:00 2001 From: SU953556 Date: Fri, 17 Apr 2020 00:38:27 +0530 Subject: [PATCH 19/39] Final fixes --- src/components/User/UserTooltip.scss | 1 + src/projects/list/components/Projects/ProjectsGridView.scss | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/User/UserTooltip.scss b/src/components/User/UserTooltip.scss index e94fcb192..885696610 100644 --- a/src/components/User/UserTooltip.scss +++ b/src/components/User/UserTooltip.scss @@ -3,6 +3,7 @@ .Tooltip { &.customer-data { .tooltip-target { + z-index: 0; display: flex; &>div:first-child { margin-left: -5px; diff --git a/src/projects/list/components/Projects/ProjectsGridView.scss b/src/projects/list/components/Projects/ProjectsGridView.scss index c36b90c2e..52bf2500d 100644 --- a/src/projects/list/components/Projects/ProjectsGridView.scss +++ b/src/projects/list/components/Projects/ProjectsGridView.scss @@ -83,7 +83,6 @@ $screen-one-column: 720px; } .item-manager { - z-index: 0; flex: 2 2 105px; min-width: 105px; .spacing { @@ -367,7 +366,6 @@ $screen-one-column: 720px; } .item-customer { - z-index: 0; padding-left: 10px; align-items: center; From e5738e16aeccdbfab6d428bedf2c78827f53ffea Mon Sep 17 00:00:00 2001 From: rashmi73 Date: Fri, 17 Apr 2020 04:20:03 +0530 Subject: [PATCH 20/39] issue 3858 fix --- src/components/AssetsLibrary/FilesGridView.jsx | 4 +++- src/components/AssetsLibrary/LinksGridView.jsx | 12 +++++++----- src/config/permissions.js | 10 ++++++++++ .../detail/containers/AssetsInfoContainer.jsx | 1 + 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/src/components/AssetsLibrary/FilesGridView.jsx b/src/components/AssetsLibrary/FilesGridView.jsx index 39baa7c4d..0f4cb2d1e 100644 --- a/src/components/AssetsLibrary/FilesGridView.jsx +++ b/src/components/AssetsLibrary/FilesGridView.jsx @@ -24,6 +24,8 @@ import { PROJECT_ASSETS_SHARED_WITH_TOPCODER_MEMBERS, PROJECT_FEED_TYPE_MESSAGES } from '../../config/constants' +import { hasPermission } from '../../helpers/permissions' +import PERMISSIONS from '../../config/permissions' let selectedLink let clearing = false @@ -251,7 +253,7 @@ const FilesGridView = ({ } const onEditCancel = () => onEditIntent(-1) const handleEditClick = () => onEditIntent(idx) - const canEdit = `${link.createdBy}` === `${loggedInUser.userId}` + const canEdit = `${link.createdBy}` === `${loggedInUser.userId}` || (hasPermission(PERMISSIONS.MANAGE_NOT_OWN_ATTACHEMENT)) const changeSubFolder = () => { onChangeSubFolder(link) diff --git a/src/components/AssetsLibrary/LinksGridView.jsx b/src/components/AssetsLibrary/LinksGridView.jsx index 48b449315..8688b344a 100644 --- a/src/components/AssetsLibrary/LinksGridView.jsx +++ b/src/components/AssetsLibrary/LinksGridView.jsx @@ -21,13 +21,13 @@ import { PROJECT_FEED_TYPE_MESSAGES } from '../../config/constants' import FilterColHeader from './FilterColHeader' +import { hasPermission } from '../../helpers/permissions' +import PERMISSIONS from '../../config/permissions' let selectedLink let clearing = false const LinksGridView = ({ - canDelete, - canEdit, links, linkToDelete, linkToEdit, @@ -38,6 +38,7 @@ const LinksGridView = ({ onEdit, onEditIntent, title, + loggedInUser, formatModifyDate, formatFolderTitle, assetsMembers, @@ -201,7 +202,7 @@ const LinksGridView = ({ selectedLink = link } const owner = _.find(assetsMembers, m => m.userId === _.parseInt(link.createdBy)) - + const canEdit = `${link.createdBy}` === `${loggedInUser.userId}` || (hasPermission(PERMISSIONS.MANAGE_NOT_OWN_ATTACHEMENT)) if (Array.isArray(link.children) && link.children.length > 0) { return (
  • @@ -275,10 +276,10 @@ const LinksGridView = ({
  • {formatModifyDate(link)}
    - {(canEdit || canDelete) && ( + {(canEdit) && ( )} @@ -299,6 +300,7 @@ LinksGridView.propTypes = { onChangeSubFolder: PropTypes.func, onDelete: PropTypes.func, title: PropTypes.string, + loggedInUser: PropTypes.object.isRequired, formatModifyDate: PropTypes.func.isRequired, formatFolderTitle: PropTypes.func.isRequired, setFilter: PropTypes.func.isRequired, diff --git a/src/config/permissions.js b/src/config/permissions.js index 0939d566e..2dae62e75 100644 --- a/src/config/permissions.js +++ b/src/config/permissions.js @@ -159,6 +159,16 @@ export default { ], }, + MANAGE_NOT_OWN_ATTACHEMENT: { + _meta: { + group: 'Project Plan', + title: 'Manage asset libraries files and links', + }, + topcoderRoles: [ + ...TOPCODER_ADMINS, + ] + }, + MANAGE_COMPLETED_PHASE: { _meta: { group: 'Project Plan', diff --git a/src/projects/detail/containers/AssetsInfoContainer.jsx b/src/projects/detail/containers/AssetsInfoContainer.jsx index ef281aa7e..081a0e755 100644 --- a/src/projects/detail/containers/AssetsInfoContainer.jsx +++ b/src/projects/detail/containers/AssetsInfoContainer.jsx @@ -896,6 +896,7 @@ class AssetsInfoContainer extends React.Component { canEdit={canManageLinks} onDelete={this.removeAttachment} onEdit={this.onEditLink} + loggedInUser={loggedInUser} formatModifyDate={formatModifyDate} formatFolderTitle={formatFolderTitle} setFilter={this.setFilter} From 44d232f3391714ddb8ea186773e3ce677c53fe82 Mon Sep 17 00:00:00 2001 From: iversonLv Date: Sat, 18 Apr 2020 12:55:04 +0800 Subject: [PATCH 21/39] Removed Console.log() --- .../settings/routes/profile/components/ProfileSettingsAvatar.jsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx b/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx index 8ef95320d..54bc579e3 100644 --- a/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx +++ b/src/routes/settings/routes/profile/components/ProfileSettingsAvatar.jsx @@ -23,7 +23,6 @@ class ProfileSettingsAvatar extends React.Component { } render() { - console.log(this.props) const { isUploading, user } = this.props const userName = getFullNameWithFallback(user) const label = isUploading ? 'Uploading, please wait' : 'Upload a new photo' From 26adf161a2083d2eaa6e053055a2fa288a510604 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Sat, 18 Apr 2020 15:39:16 +0530 Subject: [PATCH 22/39] review fix --- .../TeamManagement/TopcoderManagementDialog.js | 9 ++++++--- src/projects/actions/projectMember.js | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/components/TeamManagement/TopcoderManagementDialog.js b/src/components/TeamManagement/TopcoderManagementDialog.js index fb98bb868..4614876fa 100644 --- a/src/components/TeamManagement/TopcoderManagementDialog.js +++ b/src/components/TeamManagement/TopcoderManagementDialog.js @@ -10,7 +10,10 @@ import { getAvatarResized, getFullNameWithFallback } from '../../helpers/tcHelpe 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} from '../../config/constants' +import { + PROJECT_MEMBER_INVITE_STATUS_REQUESTED, PROJECT_MEMBER_INVITE_STATUS_PENDING, + PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED, PROJECT_MEMBER_INVITE_STATUS_REQUEST_REJECTED, +} from '../../config/constants' import PERMISSIONS from '../../config/permissions' import {hasPermission} from '../../helpers/permissions' import { compareEmail, compareHandles } from '../../helpers/utils' @@ -265,7 +268,7 @@ class TopcoderManagementDialog extends React.Component { this.setState(prevState => ({ processingInviteRequestIds: [ ...prevState.processingInviteRequestIds, invite.id ] })) approveOrDecline({ id: invite.id, - status: 'request_approved' + status: PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED }).then(() => { this.setState(prevState => ({ processingInviteRequestIds: _.xor(prevState.processingInviteRequestIds, [invite.id]) })) }) @@ -274,7 +277,7 @@ class TopcoderManagementDialog extends React.Component { this.setState(prevState => ({ processingInviteRequestIds: [ ...prevState.processingInviteRequestIds, invite.id ] })) approveOrDecline({ id: invite.id, - status: 'request_rejected' + status: PROJECT_MEMBER_INVITE_STATUS_REQUEST_REJECTED }).then(() => { this.setState(prevState => ({ processingInviteRequestIds: _.xor(prevState.processingInviteRequestIds, [invite.id]) })) }) diff --git a/src/projects/actions/projectMember.js b/src/projects/actions/projectMember.js index e703c8102..07bf81713 100644 --- a/src/projects/actions/projectMember.js +++ b/src/projects/actions/projectMember.js @@ -19,6 +19,7 @@ import {ADD_PROJECT_MEMBER, REMOVE_PROJECT_MEMBER, UPDATE_PROJECT_MEMBER, PROJECT_ROLE_CUSTOMER, CLEAR_MEMBER_SUGGESTIONS, ES_REINDEX_DELAY, + PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED, } from '../../config/constants' import { delay } from '../../helpers/utils' @@ -157,12 +158,14 @@ export function acceptOrRefuseInvite(projectId, item, currentUser) { const inviteId = item.id ? item.id : projectState.userInvitationId return dispatch({ type: ACCEPT_OR_REFUSE_INVITE, - payload: updateProjectMemberInvite(projectId, inviteId, item.status).then(() => + payload: updateProjectMemberInvite(projectId, inviteId, item.status).then(() => { // we have to add delay before applying the result of accepting/declining invitation // as it takes some time for the update to be reindexed in ES so the new state is reflected // everywhere - delay(ES_REINDEX_DELAY).then(() => dispatch(loadProjectMembers(projectId))) - ), + // if request is accepted, then also refresh project members + const inviteAccepted = item.status === PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED + return delay(ES_REINDEX_DELAY).then(() => inviteAccepted ? dispatch(loadProjectMembers(projectId)) : _.noop) + }), meta: { projectId, inviteId, currentUser }, }) } From 9977e1bc1dde3a4a60faf2a4e32300470360909b Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Sat, 18 Apr 2020 18:32:57 +0530 Subject: [PATCH 23/39] review fix --- src/projects/actions/projectMember.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/projects/actions/projectMember.js b/src/projects/actions/projectMember.js index 07bf81713..f027c870c 100644 --- a/src/projects/actions/projectMember.js +++ b/src/projects/actions/projectMember.js @@ -158,13 +158,13 @@ export function acceptOrRefuseInvite(projectId, item, currentUser) { const inviteId = item.id ? item.id : projectState.userInvitationId return dispatch({ type: ACCEPT_OR_REFUSE_INVITE, - payload: updateProjectMemberInvite(projectId, inviteId, item.status).then(() => { + payload: updateProjectMemberInvite(projectId, inviteId, item.status).then(response => { // we have to add delay before applying the result of accepting/declining invitation // as it takes some time for the update to be reindexed in ES so the new state is reflected // everywhere // if request is accepted, then also refresh project members const inviteAccepted = item.status === PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED - return delay(ES_REINDEX_DELAY).then(() => inviteAccepted ? dispatch(loadProjectMembers(projectId)) : _.noop) + return delay(ES_REINDEX_DELAY).then(() => inviteAccepted ? dispatch(loadProjectMembers(projectId)) : response) }), meta: { projectId, inviteId, currentUser }, }) From 1092f547beb518ef8c1d7e3e341b9b517c9a9b6c Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Sat, 18 Apr 2020 20:25:25 +0530 Subject: [PATCH 24/39] review fix --- src/projects/actions/projectMember.js | 6 ++++-- src/projects/reducers/project.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/projects/actions/projectMember.js b/src/projects/actions/projectMember.js index f027c870c..dd9ac6a6d 100644 --- a/src/projects/actions/projectMember.js +++ b/src/projects/actions/projectMember.js @@ -164,9 +164,11 @@ export function acceptOrRefuseInvite(projectId, item, currentUser) { // everywhere // if request is accepted, then also refresh project members const inviteAccepted = item.status === PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED - return delay(ES_REINDEX_DELAY).then(() => inviteAccepted ? dispatch(loadProjectMembers(projectId)) : response) + return delay(ES_REINDEX_DELAY).then(() => + inviteAccepted ? dispatch(loadProjectMembers(projectId)).then(() => response) : response + ) }), - meta: { projectId, inviteId, currentUser }, + meta: { projectId, currentUser }, }) } } diff --git a/src/projects/reducers/project.js b/src/projects/reducers/project.js index bbd845d34..61842f7bd 100644 --- a/src/projects/reducers/project.js +++ b/src/projects/reducers/project.js @@ -232,7 +232,7 @@ export const projectState = function (state=initialState, action) { }) case ACCEPT_OR_REFUSE_INVITE_SUCCESS: { - const { inviteId } = action.meta + const { id: inviteId } = action.payload const invites = _.filter(state.project.invites, m => m.id !== inviteId) return Object.assign({}, state, { showUserInvited: false, From a86a5715ef349139ab95ac6b1065b801a0b91e45 Mon Sep 17 00:00:00 2001 From: Vips19 Date: Sat, 18 Apr 2020 20:30:58 +0530 Subject: [PATCH 25/39] feedback fix --- .../detail/containers/AssetsInfoContainer.jsx | 2 +- src/styles/main.scss | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/projects/detail/containers/AssetsInfoContainer.jsx b/src/projects/detail/containers/AssetsInfoContainer.jsx index ef281aa7e..3eae78975 100644 --- a/src/projects/detail/containers/AssetsInfoContainer.jsx +++ b/src/projects/detail/containers/AssetsInfoContainer.jsx @@ -836,7 +836,7 @@ class AssetsInfoContainer extends React.Component {
    {(showAddNewButton) && (
    - +
    )}
    diff --git a/src/styles/main.scss b/src/styles/main.scss index 783dfbb97..23733c72b 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -1,4 +1,5 @@ @import '~tc-ui/src/styles/tc-styles'; +@import '~tc-ui/src/styles/tc-includes'; // This is the partial where we load all the Roboto fonts for Webpack @import 'fonts'; @@ -7,4 +8,16 @@ body { box-sizing: border-box; // Prevenet jumping of elements, force scrollbar always-on overflow-y: scroll; + + :global { + .tc-btn-primary { + &:hover { + color: $tc-white; + } + + &:hover,&:active,&:focus { + @include background-gradient(#3996FF, #127BF3); + } + } + } } From 1525e1ef1a9d1280523db9b38108ff11c75e82b4 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Sat, 18 Apr 2020 21:33:42 +0530 Subject: [PATCH 26/39] review fix --- src/projects/reducers/projectTopics.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/projects/reducers/projectTopics.js b/src/projects/reducers/projectTopics.js index 9a5e02df2..0963c3d6b 100644 --- a/src/projects/reducers/projectTopics.js +++ b/src/projects/reducers/projectTopics.js @@ -175,6 +175,7 @@ export const projectTopics = function (state=initialState, action) { feed.posts = feed.posts || [] if (feed.posts.length) { feed.posts[0].rawContent = rawContent + feed.posts[0].links = getLinksFromPost(rawContent) } const feedUpdateQuery = {} feedUpdateQuery[tag] = { topics: { $unshift: [feed] }, totalCount: {$apply: (n) => n + 1} } @@ -407,6 +408,7 @@ export const projectTopics = function (state=initialState, action) { const rawContent = _.get(action, 'meta.rawContent', null) const comment = payload.comment comment.rawContent = rawContent + comment.links = getLinksFromPost(rawContent) // find feed index from the state const feedIndex = _.findIndex(state.feeds[tag].topics, feed => feed.id === feedId) if (feedIndex >= 0) { From 15c6b2a99dc06b69ca258250cdbdbefa88db65b4 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Sat, 18 Apr 2020 22:33:33 +0530 Subject: [PATCH 27/39] review fix --- src/components/ProjectInfo/ProjectInfo.jsx | 2 +- src/components/ProjectInfo/ProjectInfo.scss | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/components/ProjectInfo/ProjectInfo.jsx b/src/components/ProjectInfo/ProjectInfo.jsx index 1e84d942a..365feac7c 100644 --- a/src/components/ProjectInfo/ProjectInfo.jsx +++ b/src/components/ProjectInfo/ProjectInfo.jsx @@ -66,7 +66,7 @@ class ProjectInfo extends Component {
    {_.unescape(code)}
    - {_.unescape(code)} +
    {_.unescape(code)}
    diff --git a/src/components/ProjectInfo/ProjectInfo.scss b/src/components/ProjectInfo/ProjectInfo.scss index 991089004..242a82dbc 100644 --- a/src/components/ProjectInfo/ProjectInfo.scss +++ b/src/components/ProjectInfo/ProjectInfo.scss @@ -130,8 +130,6 @@ flex: 1; width: 0; min-width: 0; - display: flex; - justify-content: flex-end; :global { .tooltip-target { @@ -141,12 +139,11 @@ .tooltip-body { display: flex; - span { - width: 200px; + div { + overflow-wrap: break-word; + word-wrap: break-word; + max-width: 200px; white-space: normal; - display: flex; - justify-content: center; - word-break: break-word; } } } @@ -155,4 +152,5 @@ .tooltip { max-width: 100%; height: 100%; + float: right; } From f56e59f928fcad2c3742bf71abf927d350187fef Mon Sep 17 00:00:00 2001 From: sr_jr Date: Sun, 19 Apr 2020 00:17:14 +0530 Subject: [PATCH 28/39] update generated permissions --- docs/permissions.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/permissions.html b/docs/permissions.html index f75b4b6b1..b0ea991b1 100644 --- a/docs/permissions.html +++ b/docs/permissions.html @@ -206,6 +206,30 @@

    User Profile

    Project Manager
    +
    +
    +

    My Projects Filter

    +
    +
    +
    +
    + My Projects Filter +
    SEE_MY_PROJECTS_FILTER
    +
    +
    +
    + administrator + Connect Admin + Connect Manager + Connect Account Manager + Business Development Representative + Presales + Account Executive + Program Manager + Solution Architect + Project Manager +
    +

    DEMO/TEST example permissions

    From 22ccef68c24ab37d2ee53669e2437edcb1326dcd Mon Sep 17 00:00:00 2001 From: abdullatku Date: Sun, 19 Apr 2020 12:23:31 +0530 Subject: [PATCH 29/39] code duplication removed --- .../detail/components/SkillsQuestion/SkillsQuestionBase.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx b/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx index a24256b9c..681f9b673 100644 --- a/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx +++ b/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx @@ -129,12 +129,10 @@ class SkillsQuestion extends React.PureComponent { onSelectType(value) { const { getValue } = this.props const { availableOptions } = this.state - const isInAvailableOptions = _.some(availableOptions, option => { - return option && option.name.trim().toLowerCase() === value.replace(';', '').trim().toLowerCase(); - }) const correspondingOption = availableOptions.find(option => { return option.name.trim().toLowerCase()===value.replace(';', '').trim().toLowerCase() }); + const isInAvailableOptions = !!correspondingOption const indexOfSpace = value.indexOf(' ') const indexOfSemiColon = value.indexOf(';') From c68e3c94bc23848fdb8e9e3ffb1d16be123801db Mon Sep 17 00:00:00 2001 From: Romit Choudhary Date: Sun, 19 Apr 2020 12:47:12 +0530 Subject: [PATCH 30/39] formatting changes reversed --- .../AutocompleteInputContainer.jsx | 52 ++++++++----------- 1 file changed, 21 insertions(+), 31 deletions(-) diff --git a/src/components/TeamManagement/AutocompleteInputContainer.jsx b/src/components/TeamManagement/AutocompleteInputContainer.jsx index 87d87d0ae..eca9cee7b 100644 --- a/src/components/TeamManagement/AutocompleteInputContainer.jsx +++ b/src/components/TeamManagement/AutocompleteInputContainer.jsx @@ -3,13 +3,11 @@ import { connect } from 'react-redux' import _ from 'lodash' import AutocompleteInput from './AutocompleteInput' -import { - memberSuggestionsDispatch, - clearMemberSuggestions, -} from '../../projects/actions/projectMember' -import { AUTOCOMPLETE_TRIGGER_LENGTH } from '../../config/constants' +import {memberSuggestionsDispatch, clearMemberSuggestions} from '../../projects/actions/projectMember' +import {AUTOCOMPLETE_TRIGGER_LENGTH} from '../../config/constants' class AutocompleteInputContainer extends React.Component { + constructor(props) { super(props) this.debounceTimer = null @@ -31,20 +29,18 @@ class AutocompleteInputContainer extends React.Component { } onInputChange(inputValue) { + const { currentUser } = this.props const indexOfSpace = inputValue.indexOf(' ') const indexOfSemiColon = inputValue.indexOf(';') // if user enter only ' ' or ';' we should clean it to not allow - if (indexOfSpace === 0 || indexOfSemiColon === 0) { + if (indexOfSpace === 0 || indexOfSemiColon === 0 ) { return '' } - if (indexOfSpace >= 1 || indexOfSemiColon >= 1) { - inputValue = inputValue.substring(0, inputValue.length - 1) - this.onUpdate([ - ...this.props.selectedMembers, - { label: inputValue, value: inputValue }, - ]) + if (indexOfSpace >= 1 || indexOfSemiColon >= 1 ) { + inputValue = inputValue.substring(0, inputValue.length -1 ) + this.onUpdate([...this.props.selectedMembers, {label: inputValue, value: inputValue}]) this.clearUserSuggestions() // this is return empty to nullify inputValue post processing return '' @@ -61,9 +57,9 @@ class AutocompleteInputContainer extends React.Component { } onUpdate(inputValue) { - const inputValueNormalized = inputValue.map((value) => ({ + const inputValueNormalized = inputValue.map(value => ({ ...value, - isEmail: /(.+)@(.+){2,}\.(.+){2,}/.test(value.label), + isEmail: (/(.+)@(.+){2,}\.(.+){2,}/).test(value.label) })) if (this.props.onUpdate) { @@ -73,11 +69,12 @@ class AutocompleteInputContainer extends React.Component { } render() { + const { placeholder, currentUser, selectedMembers, disabled } = this.props return ( { return { - suggestedMembers: reduxstore.members.suggestedMembers.map((suggestion) => { - return { - label: suggestion.handle, - value: suggestion.handle, - } - }), + suggestedMembers: reduxstore.members.suggestedMembers + .map(suggestion => { + return { + label: suggestion.handle, value: suggestion.handle + } + }) } } const mapDispatchToProps = (dispatch) => { - const debouncedDispatcher = _.debounce( - (arg) => memberSuggestionsDispatch(dispatch)(arg), - 500, - { leading: true } - ) + const debouncedDispatcher = _.debounce((arg) => memberSuggestionsDispatch(dispatch)(arg), 500, {leading: true}) return { onLoadUserSuggestions: (value) => { debouncedDispatcher(value) }, onClearUserSuggestions: () => { clearMemberSuggestions(dispatch) - }, + } } } -export default connect( - mapStateToProps, - mapDispatchToProps -)(AutocompleteInputContainer) +export default connect(mapStateToProps, mapDispatchToProps)(AutocompleteInputContainer) \ No newline at end of file From b78955b52aa8470ce100fa227fa4191331a11ab9 Mon Sep 17 00:00:00 2001 From: Romit Choudhary Date: Sun, 19 Apr 2020 12:49:07 +0530 Subject: [PATCH 31/39] formatting changes reversed --- src/components/TeamManagement/AutocompleteInputContainer.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/TeamManagement/AutocompleteInputContainer.jsx b/src/components/TeamManagement/AutocompleteInputContainer.jsx index eca9cee7b..e0c71de21 100644 --- a/src/components/TeamManagement/AutocompleteInputContainer.jsx +++ b/src/components/TeamManagement/AutocompleteInputContainer.jsx @@ -109,4 +109,4 @@ const mapDispatchToProps = (dispatch) => { } } -export default connect(mapStateToProps, mapDispatchToProps)(AutocompleteInputContainer) \ No newline at end of file +export default connect(mapStateToProps, mapDispatchToProps)(AutocompleteInputContainer) From 2cb683ee1bae25872379219b56de937b7746e4c3 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Sun, 19 Apr 2020 13:19:43 +0530 Subject: [PATCH 32/39] changed txt --- src/projects/actions/projectMember.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/projects/actions/projectMember.js b/src/projects/actions/projectMember.js index dd9ac6a6d..f11f93b6f 100644 --- a/src/projects/actions/projectMember.js +++ b/src/projects/actions/projectMember.js @@ -162,10 +162,10 @@ export function acceptOrRefuseInvite(projectId, item, currentUser) { // we have to add delay before applying the result of accepting/declining invitation // as it takes some time for the update to be reindexed in ES so the new state is reflected // everywhere - // if request is accepted, then also refresh project members - const inviteAccepted = item.status === PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED + // if invite is approved, then also refresh project members + const inviteApproved = item.status === PROJECT_MEMBER_INVITE_STATUS_REQUEST_APPROVED return delay(ES_REINDEX_DELAY).then(() => - inviteAccepted ? dispatch(loadProjectMembers(projectId)).then(() => response) : response + inviteApproved ? dispatch(loadProjectMembers(projectId)).then(() => response) : response ) }), meta: { projectId, currentUser }, From 87130105d73bae36499c00a51a83fd3b971e5bd4 Mon Sep 17 00:00:00 2001 From: Vips19 Date: Sun, 19 Apr 2020 14:39:27 +0530 Subject: [PATCH 33/39] final fix --- .../detail/containers/AssetsInfoContainer.jsx | 2 +- .../detail/containers/AssetsInfoContainer.scss | 15 --------------- src/styles/main.scss | 4 ++-- 3 files changed, 3 insertions(+), 18 deletions(-) diff --git a/src/projects/detail/containers/AssetsInfoContainer.jsx b/src/projects/detail/containers/AssetsInfoContainer.jsx index 3eae78975..5518fdbf6 100644 --- a/src/projects/detail/containers/AssetsInfoContainer.jsx +++ b/src/projects/detail/containers/AssetsInfoContainer.jsx @@ -836,7 +836,7 @@ class AssetsInfoContainer extends React.Component {
    {(showAddNewButton) && (
    - +
    )}
    diff --git a/src/projects/detail/containers/AssetsInfoContainer.scss b/src/projects/detail/containers/AssetsInfoContainer.scss index 8262885f7..15d995c90 100644 --- a/src/projects/detail/containers/AssetsInfoContainer.scss +++ b/src/projects/detail/containers/AssetsInfoContainer.scss @@ -22,18 +22,3 @@ display: block; float: right; } - -.add-new-button { - border-radius: 10px; - width: 105px; - height: 20px; - color: $tc-white; - font-family: Roboto; - font-size: 10px; - font-weight: 700; - line-height: 10px; - text-align: center; - text-transform: uppercase; - background-color: $tc-dark-blue-100; - border: 0; -} diff --git a/src/styles/main.scss b/src/styles/main.scss index 23733c72b..85aa9ca2a 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -11,11 +11,11 @@ body { :global { .tc-btn-primary { - &:hover { + &:hover,&:active,&:focus { color: $tc-white; } - &:hover,&:active,&:focus { + &:hover { @include background-gradient(#3996FF, #127BF3); } } From 6e64894efc8de2026ab8f5520cec7fca83a25ef8 Mon Sep 17 00:00:00 2001 From: Maksym Mykhailenko Date: Sun, 19 Apr 2020 13:34:05 +0300 Subject: [PATCH 34/39] fix: lint --- .../detail/components/SkillsQuestion/SkillsQuestionBase.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx b/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx index 681f9b673..d8715a190 100644 --- a/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx +++ b/src/projects/detail/components/SkillsQuestion/SkillsQuestionBase.jsx @@ -131,7 +131,7 @@ class SkillsQuestion extends React.PureComponent { const { availableOptions } = this.state const correspondingOption = availableOptions.find(option => { return option.name.trim().toLowerCase()===value.replace(';', '').trim().toLowerCase() - }); + }) const isInAvailableOptions = !!correspondingOption const indexOfSpace = value.indexOf(' ') const indexOfSemiColon = value.indexOf(';') @@ -226,7 +226,7 @@ class SkillsQuestion extends React.PureComponent { noOptionsMessage={() => 'No results found'} options={selectGroupOptions} isDisabled={questionDisabled} - + />
    { hasError && (

    {errorMessage}

    ) } From 67441da594521bdc300887dbceb8de7b7f9f47a0 Mon Sep 17 00:00:00 2001 From: Maksym Mykhailenko Date: Sun, 19 Apr 2020 13:42:23 +0300 Subject: [PATCH 35/39] fix: improve CSS rule and comments ref issue #3773 --- src/styles/main.scss | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/styles/main.scss b/src/styles/main.scss index 85aa9ca2a..c8dd34f16 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -8,10 +8,22 @@ body { box-sizing: border-box; // Prevenet jumping of elements, force scrollbar always-on overflow-y: scroll; - + :global { - .tc-btn-primary { - &:hover,&:active,&:focus { + // fix hover styles for links: + // as links don't have `:enabled` prop we have to apply the same style as we apply to `:enabled` elements + // see https://github.com/appirio-tech/tc-ui/blob/feature/connectv2/src/styles/_buttons.scss#L66-L74 + // we still have to make sure that this common style is not applied to `:disabled` elements so we use + // `:not(:disabled)` selector + // + // TODO move this fix to `tc-ui` + // most likely what we can do is to update rules in + // https://github.com/appirio-tech/tc-ui/blob/feature/connectv2/src/styles/_buttons.scss + // from `:enabled` to `:not(:disabled)` + .tc-btn-primary:not(:disabled) { + &:hover, + &:active, + &:focus { color: $tc-white; } From 8451554895264be1b34bf7be925dc9f39d7d5e16 Mon Sep 17 00:00:00 2001 From: Sumit Daga Date: Sun, 19 Apr 2020 16:37:14 +0530 Subject: [PATCH 36/39] review fix --- src/components/ProjectInfo/ProjectInfo.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ProjectInfo/ProjectInfo.scss b/src/components/ProjectInfo/ProjectInfo.scss index 242a82dbc..a0e7b9fd1 100644 --- a/src/components/ProjectInfo/ProjectInfo.scss +++ b/src/components/ProjectInfo/ProjectInfo.scss @@ -140,10 +140,10 @@ display: flex; div { - overflow-wrap: break-word; word-wrap: break-word; max-width: 200px; white-space: normal; + overflow: hidden; } } } From 4fb1939509ba10953ff25ee1d64423a1667470d4 Mon Sep 17 00:00:00 2001 From: Maksym Mykhailenko Date: Sun, 19 Apr 2020 14:13:43 +0300 Subject: [PATCH 37/39] fix: lint, comments, improve ref issue #3424 --- .../TeamManagement/AutocompleteInputContainer.jsx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/components/TeamManagement/AutocompleteInputContainer.jsx b/src/components/TeamManagement/AutocompleteInputContainer.jsx index e0c71de21..8bf201179 100644 --- a/src/components/TeamManagement/AutocompleteInputContainer.jsx +++ b/src/components/TeamManagement/AutocompleteInputContainer.jsx @@ -19,17 +19,15 @@ class AutocompleteInputContainer extends React.Component { * Clear user suggestion list */ clearUserSuggestions() { - const { currentUser } = this.props + const { showSuggestions } = this.props - if (!currentUser.isCustomer) { - // When customer user is typing a user handle to invite we should not try to clear suggestions, - // because we don't show suggestions for customer + if (!showSuggestions) { + // When we don't show suggestions, we should not clean them this.props.onClearUserSuggestions() } } onInputChange(inputValue) { - const { currentUser } = this.props const indexOfSpace = inputValue.indexOf(' ') const indexOfSemiColon = inputValue.indexOf(';') @@ -47,7 +45,7 @@ class AutocompleteInputContainer extends React.Component { } if (inputValue.length >= AUTOCOMPLETE_TRIGGER_LENGTH) { - // When customer user is typing a user handle to invite we should not try to show suggestions as we always get error 403 + // When user doesn't have permissions to retrieve suggestions should not try to show suggestions as we always get error 403 if (this.props.showSuggestions) { this.props.onLoadUserSuggestions(inputValue) } From 090f66d9f42c8ddba92d87faf4502e9f203e03bd Mon Sep 17 00:00:00 2001 From: rashmi73 Date: Sun, 19 Apr 2020 17:18:05 +0530 Subject: [PATCH 38/39] issue 3858 doc fix --- docs/permissions.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/permissions.html b/docs/permissions.html index f75b4b6b1..536293412 100644 --- a/docs/permissions.html +++ b/docs/permissions.html @@ -48,6 +48,17 @@

    Project Plan

    Connect Admin +
    +
    + Manage asset libraries files and links +
    MANAGE_NOT_OWN_ATTACHEMENT
    +
    +
    +
    + administrator + Connect Admin +
    +
    Manage completed phases From 0eb650eaffc4995abcc2622e3c2ab0088563a671 Mon Sep 17 00:00:00 2001 From: SU953556 Date: Sun, 19 Apr 2020 17:24:21 +0530 Subject: [PATCH 39/39] feedback fixed --- .../settings/routes/profile/components/ProfileSettingsForm.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/routes/settings/routes/profile/components/ProfileSettingsForm.scss b/src/routes/settings/routes/profile/components/ProfileSettingsForm.scss index eb52f411f..cf759450e 100644 --- a/src/routes/settings/routes/profile/components/ProfileSettingsForm.scss +++ b/src/routes/settings/routes/profile/components/ProfileSettingsForm.scss @@ -84,6 +84,7 @@ margin-bottom: 0; } :global(.Dropdown) { + overflow-y: scroll; height: 120px; } }