diff --git a/frontend/src/utils/grid/cellRenderers.jsx b/frontend/src/utils/grid/cellRenderers.jsx index 7563007f4..642ba9fed 100644 --- a/frontend/src/utils/grid/cellRenderers.jsx +++ b/frontend/src/utils/grid/cellRenderers.jsx @@ -65,6 +65,35 @@ export const StatusRenderer = (props) => { ) } +export const LoginStatusRenderer = (props) => { + return ( + + + + ) +} + export const OrgStatusRenderer = (props) => { const location = useLocation() const statusArr = getAllOrganizationStatuses() diff --git a/frontend/src/views/Admin/AdminMenu/components/UserLoginHistory.jsx b/frontend/src/views/Admin/AdminMenu/components/UserLoginHistory.jsx index 3f3fbc452..7be94f126 100644 --- a/frontend/src/views/Admin/AdminMenu/components/UserLoginHistory.jsx +++ b/frontend/src/views/Admin/AdminMenu/components/UserLoginHistory.jsx @@ -10,7 +10,7 @@ export const UserLoginHistory = () => { const { t } = useTranslation(['common', 'admin']) const getRowId = useCallback((params) => { - return params.data.userLoginHistoryId + return params.data.userLoginHistoryId.toString() }, []) return ( diff --git a/frontend/src/views/Admin/AdminMenu/components/_schema.js b/frontend/src/views/Admin/AdminMenu/components/_schema.js index 7b46ba5bb..1c8093fe5 100644 --- a/frontend/src/views/Admin/AdminMenu/components/_schema.js +++ b/frontend/src/views/Admin/AdminMenu/components/_schema.js @@ -5,6 +5,7 @@ import { } from '@/utils/formatters' import { LinkRenderer, + LoginStatusRenderer, RoleRenderer, StatusRenderer } from '@/utils/grid/cellRenderers' @@ -113,15 +114,6 @@ export const usersColumnDefs = (t) => [ } ] -export const usersDefaultColDef = { - resizable: true, - sortable: true, - filter: true, - minWidth: 300, - floatingFilter: true, // enables the filter boxes under the header label - suppressHeaderMenuButton: true // suppresses the menu button appearing next to the Header Label -} - export const idirUserDefaultFilter = [ { filterType: 'text', type: 'blank', field: 'organizationId', filter: '' } ] @@ -175,28 +167,24 @@ export const userLoginHistoryColDefs = (t) => [ }, { field: 'keycloakEmail', - headerName: t('admin:userLoginHistoryColLabels.keycloakEmail'), - cellDataType: 'string' + headerName: t('admin:userLoginHistoryColLabels.keycloakEmail') }, { field: 'keycloakUserId', - headerName: t('admin:userLoginHistoryColLabels.keycloakUserId'), - cellDataType: 'string' + headerName: t('admin:userLoginHistoryColLabels.keycloakUserId') }, { field: 'externalUsername', - headerName: t('admin:userLoginHistoryColLabels.externalUsername'), - cellDataType: 'string' + headerName: t('admin:userLoginHistoryColLabels.externalUsername') }, { field: 'isLoginSuccessful', headerName: t('admin:userLoginHistoryColLabels.isLoginSuccessful'), - cellDataType: 'boolean' + cellRenderer: LoginStatusRenderer }, { field: 'loginErrorMessage', - headerName: t('admin:userLoginHistoryColLabels.loginErrorMessage'), - cellDataType: 'string' + headerName: t('admin:userLoginHistoryColLabels.loginErrorMessage') }, { field: 'createDate',