diff --git a/client/web/src/_nav.js b/client/web/src/_nav.js index 9615582c..1004c13d 100644 --- a/client/web/src/_nav.js +++ b/client/web/src/_nav.js @@ -24,6 +24,7 @@ import { cilUserPlus, } from '@coreui/icons' import { CNavGroup, CNavItem } from '@coreui/react' +import { BaseUserRoute } from './users' const _nav = [ { @@ -87,8 +88,8 @@ const _nav = [ }, { component: CNavItem, - name: 'Users', - to: '/users', + name: 'System Users', + to: BaseUserRoute, icon: , }, ] diff --git a/client/web/src/users/UserDeleteConfirmationComponent.js b/client/web/src/users/UserDeleteConfirmationComponent.js index 80b1ee02..5cff7fca 100644 --- a/client/web/src/users/UserDeleteConfirmationComponent.js +++ b/client/web/src/users/UserDeleteConfirmationComponent.js @@ -60,7 +60,7 @@ export default function UserDeleteConfirmationComponent(props) {
Delete User -

Are you sure you want to delete the user '{username}'?

+

Are you sure you want to delete the system user '{username}'?

Type 'delete' to confirm:

diff --git a/client/web/src/users/UserFormComponent.js b/client/web/src/users/UserFormComponent.js index 93017195..baa40863 100644 --- a/client/web/src/users/UserFormComponent.js +++ b/client/web/src/users/UserFormComponent.js @@ -67,7 +67,7 @@ export const UserFormComponent = ({ - User Details + System User Details @@ -93,7 +93,7 @@ export const UserListComponent = ({ - Users + System Users {table} diff --git a/client/web/src/users/UserListContainer.js b/client/web/src/users/UserListContainer.js index 2c5313cc..185e7044 100644 --- a/client/web/src/users/UserListContainer.js +++ b/client/web/src/users/UserListContainer.js @@ -19,6 +19,7 @@ import { UserListComponent } from './UserListComponent' import { useDispatch, useSelector } from 'react-redux' import { fetchUsers, selectAllUsers, dismissError } from './ducks' import { useHistory } from 'react-router-dom' +import { BaseUserRoute } from '.' export default function UserListContainer() { const dispatch = useDispatch() @@ -29,7 +30,7 @@ export default function UserListContainer() { const error = useSelector((state) => state.users.error) const handleUserClick = (username) => { - history.push(`/users/${username}`) + history.push(`${BaseUserRoute}/${username}`) } const handleRefresh = () => { @@ -37,7 +38,7 @@ export default function UserListContainer() { } const handleCreateUser = () => { - history.push(`/users/create`) + history.push(`${BaseUserRoute}/create`) } const handleError = () => { diff --git a/client/web/src/users/UserViewComponent.js b/client/web/src/users/UserViewComponent.js index 5646a4cd..5cda061d 100644 --- a/client/web/src/users/UserViewComponent.js +++ b/client/web/src/users/UserViewComponent.js @@ -28,7 +28,6 @@ import { CardHeader, CardBody, } from 'reactstrap' -import { SBMoment } from '../components/SBMoment' import Moment from 'react-moment' import Display from '../components/Display' import UserDeleteConfirmationComponent from './UserDeleteConfirmationComponent' @@ -135,7 +134,7 @@ export class UserViewComponent extends Component { - User Details + System User Details diff --git a/client/web/src/users/UserViewContainer.js b/client/web/src/users/UserViewContainer.js index c069f4d7..c7f9be56 100644 --- a/client/web/src/users/UserViewContainer.js +++ b/client/web/src/users/UserViewContainer.js @@ -19,6 +19,7 @@ import UserViewComponent from './UserViewComponent' import { UserFormComponent } from './UserFormComponent' import { connect } from 'react-redux' import { withRouter } from 'react-router' +import { BaseUserRoute } from '.' import { fetchUser, @@ -115,7 +116,7 @@ class UserViewContainer extends Component { try { const deletedUserResponse = await deletedUser(username) if (!deletedUserResponse.error) { - history.push('/users') + history.push(BaseUserRoute) } else { toggleDeleteModal() setSubmitting(false) diff --git a/client/web/src/users/index.js b/client/web/src/users/index.js index 683ab139..89c1a034 100644 --- a/client/web/src/users/index.js +++ b/client/web/src/users/index.js @@ -20,23 +20,25 @@ const UserListContainer = lazy(() => import('./UserListContainer')) const UserViewContainer = lazy(() => import('./UserViewContainer')) const UserCreateContainer = lazy(() => import('./UserCreateContainer')) +export const BaseUserRoute = '/sysusers' + export const UserRoutes = [ { - path: '/users', + path: BaseUserRoute, exact: true, - name: 'Users', + name: 'System Users', component: UserListContainer, }, { - path: '/users/create', + path: BaseUserRoute + '/create', exact: true, - name: 'Create a new User', + name: 'Create a new System User', component: UserCreateContainer, }, { - path: '/users/:username', + path: BaseUserRoute + '/:username', exact: true, - name: 'User Detail', + name: 'System User Detail', component: UserViewContainer, }, ]