Skip to content

Commit

Permalink
fix: variable changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kanikabansal-juspay committed Oct 25, 2024
1 parent 143a04e commit 26269f6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ module RoleAccessOverview = {
->getArrayDataFromJson(UserUtils.itemToObjMapperFordetailedRoleInfo)

let roleInfo = Recoil.useRecoilValueFromAtom(HyperswitchAtom.moduleListRecoil)
Js.log(roleInfo)
let (modulesWithAccess, moduleWithoutAccess) = UserUtils.modulesWithUserAccess(
roleInfo,
detailedUserAccess,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ type parentGroupType =
| UnknownGroup(string)

@unboxed
type groupControlType = View | Manage

type groupControlType2 = Read | Write
type groupScopeType = Read | Write

type allSelectionType = [#All_Merchants | #All_Profiles]

Expand Down
6 changes: 3 additions & 3 deletions src/screens/UserManagement/UserRevamp/UserUtils.res
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,16 @@ let itemToObjMapperFordetailedRoleInfo: Dict.t<

let modulesWithUserAccess = (
roleInfo: array<UserManagementTypes.userModuleType>,
userAccessGroup2: array<UserManagementTypes.detailedUserModuleType>,
userAccessGroup: array<UserManagementTypes.detailedUserModuleType>,
) => {
open UserManagementTypes
let modulesWithAccess = []
let modulesWithoutAccess = []
//array of groupnames accessible to the specific user role
let accessGroupNames = userAccessGroup2->Array.map(item => item.parentGroup)
let accessGroupNames = userAccessGroup->Array.map(item => item.parentGroup)
roleInfo->Array.forEach(item => {
if accessGroupNames->Array.includes(item.parentGroup) {
let accessGroup = userAccessGroup2->Array.find(group => group.parentGroup == item.parentGroup)
let accessGroup = userAccessGroup->Array.find(group => group.parentGroup == item.parentGroup)
switch accessGroup {
| Some(val) => {
let manipulatedObject = {
Expand Down

0 comments on commit 26269f6

Please sign in to comment.