Skip to content

Commit

Permalink
fix: 26339 Unable to remove error reported WS member
Browse files Browse the repository at this point in the history
  • Loading branch information
tienifr committed Sep 7, 2023
1 parent ce6b056 commit 164a12a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -747,11 +747,16 @@ function clearDeleteMemberError(policyID, accountID) {
* @param {Number} accountID
*/
function clearAddMemberError(policyID, accountID) {
Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`, {
Onyx.set(`${ONYXKEYS.PERSONAL_DETAILS_LIST}`, {
...allPersonalDetails,
[accountID]: null,
});
Onyx.merge(`${ONYXKEYS.PERSONAL_DETAILS_LIST}`, {
[accountID]: null,

Onyx.merge(`${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`, {
[accountID]: {
pendingAction: null,
errors: null,
},
});
}

Expand Down
1 change: 1 addition & 0 deletions src/pages/workspace/WorkspaceMembersPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,7 @@ function WorkspaceMembersPage(props) {

result.push({
keyForList: accountID,
accountID: Number(accountID),
isSelected: _.contains(selectedEmployees, Number(accountID)),
isDisabled: accountID === props.session.accountID || details.login === props.policy.owner || policyMember.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE,
text: props.formatPhoneNumber(details.displayName),
Expand Down

0 comments on commit 164a12a

Please sign in to comment.