From ff6499771645c096d04e26acbec3efa2b137cf2c Mon Sep 17 00:00:00 2001 From: Riddhiagrawal001 <50551695+Riddhiagrawal001@users.noreply.github.com> Date: Thu, 19 Sep 2024 17:52:26 +0530 Subject: [PATCH] fix: user management name changes (#1432) --- .../UserRevamp/ListRolesTableEntity.res | 2 +- src/screens/UserManagement/UserRevamp/UserInfo.res | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/screens/UserManagement/UserRevamp/ListRolesTableEntity.res b/src/screens/UserManagement/UserRevamp/ListRolesTableEntity.res index 8240273cf..efed441cc 100644 --- a/src/screens/UserManagement/UserRevamp/ListRolesTableEntity.res +++ b/src/screens/UserManagement/UserRevamp/ListRolesTableEntity.res @@ -26,7 +26,7 @@ let itemToObjMapperForRoles = dict => { let getHeadingForRoles = (colType: rolesColTypes) => { switch colType { - | RoleName => Table.makeHeaderInfo(~key="role_name", ~title="Role name") + | RoleName => Table.makeHeaderInfo(~key="role_name", ~title="Role name", ~showSort=true) | RoleScope => Table.makeHeaderInfo(~key="role_scope", ~title="Role scope") | EntityType => Table.makeHeaderInfo(~key="entity_type", ~title="Entity Type") | ModulePermissions => Table.makeHeaderInfo(~key="groups", ~title="Module permissions") diff --git a/src/screens/UserManagement/UserRevamp/UserInfo.res b/src/screens/UserManagement/UserRevamp/UserInfo.res index 3181d9883..35c1e4798 100644 --- a/src/screens/UserManagement/UserRevamp/UserInfo.res +++ b/src/screens/UserManagement/UserRevamp/UserInfo.res @@ -57,7 +57,6 @@ module TableRowForUserDetails = { @react.component let make = ( ~arrayValue: array, - ~merchantName, ~parentIndex, ~noOfElementsInParent, ) => { @@ -77,6 +76,11 @@ module TableRowForUserDetails = { ->Array.mapWithIndex((value, index) => { let (statusValue, statusColor) = value.status->UserUtils.getLabelForStatus + let profileName = value.profile.name->isEmptyString ? value.profile.value : value.profile.name + + let merchantName = + value.merchant.name->isEmptyString ? value.merchant.value : value.merchant.name + borderStyle}`}> capitalizeString->React.string} - {value.profile.name->React.string} + {profileName->React.string} {value.roleId->snakeToTitle->capitalizeString->React.string} @@ -135,10 +139,7 @@ module UserAccessInfo = { ->Dict.keysToArray ->Array.mapWithIndex((items, parentIndex) => { getObjectForThekey} - parentIndex - noOfElementsInParent + arrayValue={items->getObjectForThekey} parentIndex noOfElementsInParent /> }) ->React.array}