diff --git a/apcd-cms/src/apps/utils/apcd_database.py b/apcd-cms/src/apps/utils/apcd_database.py index 51af17a3..307e1b52 100644 --- a/apcd-cms/src/apps/utils/apcd_database.py +++ b/apcd-cms/src/apps/utils/apcd_database.py @@ -38,7 +38,7 @@ def get_users(): LEFT JOIN submitter_users ON users.user_id = submitter_users.user_id AND users.user_number = submitter_users.user_number LEFT JOIN submitters on submitter_users.submitter_id = submitters.submitter_id - ORDER BY submitters.entity_name ASC; + ORDER BY submitters.entity_name, users.user_id ASC; """ cur = conn.cursor() cur.execute(query) diff --git a/apcd-cms/src/apps/view_users/static/view_users_table/css/table.css b/apcd-cms/src/apps/view_users/static/view_users_table/css/table.css index 86482808..7d19ac20 100644 --- a/apcd-cms/src/apps/view_users/static/view_users_table/css/table.css +++ b/apcd-cms/src/apps/view_users/static/view_users_table/css/table.css @@ -11,11 +11,11 @@ @media (max-width: 767px) { /* To label the cells */ /* RFE: Add `data-label` to each cell so we can use `attr(data-label)` */ - .users-table td:nth-of-type(1):before { content: "User Name"; } - .users-table td:nth-of-type(2):before { content: "Role"; } - .users-table td:nth-of-type(3):before { content: "Organization"; } - .users-table td:nth-of-type(4):before { content: "Email"; } - .users-table td:nth-of-type(5):before { content: "Created"; } - .users-table td:nth-of-type(6):before { content: "Updated"; } - .users-table td:nth-of-type(7):before { content: "Notes"; } + .users-table td:nth-of-type(1):before { content: "User Id"; } + .users-table td:nth-of-type(2):before { content: "Name"; } + .users-table td:nth-of-type(3):before { content: "Entity Organization'"; } + .users-table td:nth-of-type(4):before { content: "Role"; } + .users-table td:nth-of-type(5):before { content: "Status"; } + .users-table td:nth-of-type(6):before { content: "User Number"; } + .users-table td:nth-of-type(7):before { content: "Actions"; } } diff --git a/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewRecordModal.tsx b/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewRecordModal.tsx index 4a2c26ab..0d9f4a6f 100644 --- a/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewRecordModal.tsx +++ b/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewRecordModal.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Modal, ModalHeader, ModalBody, Label } from 'reactstrap'; +import { Modal, Row, Col, ModalBody } from 'reactstrap'; import { UserRow } from 'hooks/admin'; import styles from './ViewUsers.module.scss'; import { formatDate } from 'utils/dateUtil'; @@ -20,9 +20,9 @@ const UserDetailsModal: React.FC = ({ return (
-
- -

- User ID: {user.user_id} -

-

- Name: {user.user_name} -

-

- User Number: {user.user_number} -

-

- Email: {user.user_email} -

-

- Entity Organization: {user.entity_name} -

-

- Role: {user.role_name} -

-

- Status: {user.status} -

-

- Created Date: {formatDate(user.created_at)} -

-

- Updated Date: {formatDate(user.updated_at)} -

-

- Notes: {user.notes ? user.notes : 'None'} -

+ + +
+ + + User ID: + + {user.user_id} + + + + Name: + + {user.user_name} + + + + User Number: + + {user.user_number} + + + + Email: + + {user.user_email} + + + + Entity Organization: + + {user.entity_name} + + + + Role: + + {user.role_name} + + + + Status: + + {user.status} + + + + Created Date: + + {formatDate(user.created_at)} + + + + Updated Date: + + {formatDate(user.updated_at)} + + + + Notes: + + {user.notes ? user.notes : 'None'} + +
); diff --git a/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.module.scss b/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.module.scss index 419d1eb6..1c6ce69a 100644 --- a/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.module.scss +++ b/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.module.scss @@ -46,3 +46,17 @@ $modal-width: 55%; height: 100%; /* Adjust as needed */ padding-top: 20px; } + +.userkey { + padding-bottom: 0.05em; + padding-right: 0.25em; +} + +.userListing { + padding-left: 0.25em; + padding-right: 0.25em; +} + +.userRow { + padding-bottom: 0.1em; +} diff --git a/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.tsx b/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.tsx index 06bca0cb..ff75dfbb 100644 --- a/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.tsx +++ b/apcd-cms/src/client/src/components/Admin/ViewUsers/ViewUsers.tsx @@ -137,7 +137,7 @@ export const ViewUsers: React.FC = () => {
- +
{header.map((columnName: string, index: number) => (