-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ops 441 initial page and combobox #2653
Conversation
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
# Conflicts: # frontend/src/tests/data.js
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
Signed-off-by: John DeAngelis <[email protected]>
const [selectedRoles, setSelectedRoles] = React.useState([]); | ||
const statusData = [ | ||
{ id: 1, name: "ACTIVE" }, | ||
{ id: 2, name: "INACTIVE" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACTIVE, INACTIVE, LOCKED would be a good use-case for an ENUM
const { data: divisions, error: errorDivisions, isLoading: isLoadingDivisions } = useGetDivisionsQuery(); | ||
const { data: roles, error: errorRoles, isLoading: isLoadingRoles } = useGetRolesQuery(); | ||
|
||
useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥nice useEffect
|
||
.centeredItem { | ||
align-items: center; | ||
display: flex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be able to use USWDS classes here like: "display-flex, flex-align-center"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⭐ User-Admin is much improved. Have a few observations that don't pass the how-to-test section.
I apologize @fpigeonjr , I messed up the "How to Test" section. You are correct that the test user with the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed the steps in How To Test and the changes checked out.
* @property {string} INACTIVE - Represents an inactive status for a user. | ||
* @property {string} LOCKED - Represents a locked status for a user. | ||
*/ | ||
export const USER_STATUS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤩
What changed
User Admin
page (only accessible by users with theUSER_ADMIN
role)Budget Team
user with rolesBUDGET_TEAM
andUSER_ADMIN
UserInfo
component to make editable byUSER_ADMIN
(and display human readable values)opsAuthAPI
msw
JS stub (mocks.js
)Issue
#441
How to test
USER_ADMIN
role can access theUser Admin
menu optionAdmin
and the menu option should not be visible.Budget Team
and the option should be visible (since BT is aUSER_ADMIN
)USER_ADMIN
has an editable view ofUserInfo
Login as
Admin
(or any user other thanBudget Team
)Click on the user's email address in the upper right of the page to go to the
User Details
page.Verify that the
UserInfo
is read-only.Login as
Budget Team
Click on the user's email address in the upper right of the page to go to the
User Details
page.Verify that the
UserInfo
is editable, i.e. has combo boxes for status, role, and divisionN.B. The actual persistence of the
UserInfo
changes will be covered in a future PR. (There is already too much going on in this PR)Screenshots
If relevant, e.g. for a front-end feature
Definition of Done Checklist