Skip to content

Commit

Permalink
fix: issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Nov 23, 2022
1 parent 598e4ec commit bd976e8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ class WorkspaceMembersPage extends React.Component {
* Toggle user from the selectedEmployees list
*
* @param {String} login
* @param {String} pendingAction
*
*/
toggleUser(login) {
if (this.willTooltipShowForLogin(login)) {
toggleUser(login, pendingAction) {
if (this.willTooltipShowForLogin(login) || pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) {
return;
}

Expand Down Expand Up @@ -250,7 +252,7 @@ class WorkspaceMembersPage extends React.Component {
renderItem({
item,
}) {
const canBeRemoved = this.props.policy.owner !== item.login && this.props.session.email !== item.login;
const canBeRemoved = this.props.policy.owner !== item.login && this.props.session.email !== item.login && item.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE;
return (
<OfflineWithFeedback errorRowStyles={[styles.peopleRowBorderBottom]} onClose={() => this.dismissError(item)} pendingAction={item.pendingAction} errors={item.errors}>
<Hoverable onHoverIn={() => this.willTooltipShowForLogin(item.login, true)} onHoverOut={() => this.setState({showTooltipForLogin: ''})}>
Expand Down Expand Up @@ -313,6 +315,7 @@ class WorkspaceMembersPage extends React.Component {
data = _.sortBy(data, value => value.displayName.toLowerCase());
const policyID = lodashGet(this.props.route, 'params.policyID');
const policyName = lodashGet(this.props.policy, 'name');

return (
<ScreenWrapper style={[styles.defaultModalContainer]}>
<FullPageNotFoundView shouldShow={_.isEmpty(this.props.policy)}>
Expand Down

0 comments on commit bd976e8

Please sign in to comment.