Skip to content

Commit

Permalink
Get team from group (#231)
Browse files Browse the repository at this point in the history
* Adds a function to get team from group for Shared Bucket Detail to replace manually added suffixes to be stripped

DPSTAT-922

* Minor code refactoring

* .
  • Loading branch information
johnnadeluy authored Apr 15, 2024
1 parent 05995d7 commit afa9f3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/SharedBucketDetail/SharedBucketDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ const SharedBucketDetail = () => {
}
} = {}

const allTeams = response['allTeams'] as Team[]
;((response['sharedBucket'] as SharedBucket).groups ?? []).forEach(({ uniform_name, users }) => {
;(users ?? []).forEach((user) => {
const team_name = getTeamFromGroup(response['allTeams'] as Team[], uniform_name)
const team_name = getTeamFromGroup(allTeams, uniform_name)
const group_type = getGroupType(team_name, uniform_name)
const key = `${user.principal_name}-${team_name}`
if (!usersMap[key]) {
Expand Down

0 comments on commit afa9f3b

Please sign in to comment.