Skip to content

Commit

Permalink
Merge pull request #37892 from burczu/bugfix/37757-admin-badge-not-gr…
Browse files Browse the repository at this point in the history
…eyed-out

bugfix #37757: admin badge on members list not greyed out when added offline
  • Loading branch information
luacmartins authored Mar 7, 2024
2 parents 7b51c3a + fc04a8a commit fc91f3f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/libs/actions/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -749,9 +749,9 @@ function updateWorkspaceMembersRole(policyID: string, accountIDs: number[], newR
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`,
value: {
...memberRoles.reduce((member: Record<number, {role: string}>, current) => {
...memberRoles.reduce((member: Record<number, {role: string; pendingAction: string | null}>, current) => {
// eslint-disable-next-line no-param-reassign
member[current.accountID] = {role: current?.role};
member[current.accountID] = {role: current?.role, pendingAction: CONST.RED_BRICK_ROAD_PENDING_ACTION.UPDATE};
return member;
}, {}),
errors: null,
Expand All @@ -764,6 +764,11 @@ function updateWorkspaceMembersRole(policyID: string, accountIDs: number[], newR
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY_MEMBERS}${policyID}`,
value: {
...memberRoles.reduce((member: Record<number, {role: string; pendingAction: string | null}>, current) => {
// eslint-disable-next-line no-param-reassign
member[current.accountID] = {role: current?.role, pendingAction: null};
return member;
}, {}),
errors: null,
},
},
Expand Down

0 comments on commit fc91f3f

Please sign in to comment.