Skip to content
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

PIMS-680/1294: Admin Users View UI & Access Request Submission #2168

Merged
merged 54 commits into from
Feb 15, 2024

Conversation

GrahamS-Quartech
Copy link
Contributor

@GrahamS-Quartech GrahamS-Quartech commented Feb 3, 2024

🎯 Summary

PIMS-680

  • Made a reusable "DataCard" component that you can use to show some arbitrary data in a simple card view with a little edit button.
  • Made some modular Dialog components as well, which should hopefully serve most use cases.
  • Made a user details page according to the screenshots in the PR. It doesn't link back to anything yet though, needs the users table PR.

Not wired up to the API in this state, for that I need 1260 merged in.

Was also considering making the form bits into their own reusable component, but I'm not sure how generic one could make it. I feel like there's usually a lot of customization that needs to be done in terms of how the fields are placed, what types of field to use, what labels to use, so much so that a reusable component might be more cumbersome than just dropping in the field components into a grid as I've done here. Any thoughts on this?

PIMS-1294

Now you should be able to submit an access request! Except there is no access request table anymore, this just creates a user with status "OnHold."

🔰 Checklist

  • I have read and agree with the following checklist and am following the guidelines in our Code of Conduct document.
  • I have performed a self-review of my code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation where required.
  • I have tested my changes to the best of my ability.
  • My changes generate no new warnings.

GrahamS-Quartech and others added 21 commits January 30, 2024 16:25
…tation, could be improved to avoid redundant 401s when requesting without the bearer loaded.
…mented an authrouteguard to make sure the necessary context is available before making authenticated calls and rendering pages
… fetching data within react components. Included some example usage for the DevZone.
…ct itself from the db, plus some context/hook to use this in the frontend
…e basic flow of adding a user/access request
Copy link
Collaborator

@dbarkowsky dbarkowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the addition of the formatters.
A few changes requested, plus linting to take care of some missing newlines.

Edit: Oops. Didn't realize this was still in draft!

react-app/src/components/dialog/DeleteDialog.tsx Outdated Show resolved Hide resolved
react-app/src/utils/formatters.tsx Outdated Show resolved Hide resolved
@GrahamS-Quartech GrahamS-Quartech changed the title PIMS-680: Admin Users View UI PIMS-680/1294: Admin Users View UI & Access Request Submission Feb 14, 2024
Copy link
Collaborator

@dbarkowsky dbarkowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One suggestion for how the Roles are presented, but if we're getting this from the API in the future, shouldn't be an issue. May have to adjust the enum string value though.

Believe the container issue is fixed.

options={[
//TODO: Get these through a lookup endpoint.
{ label: 'Active', value: 'Active' },
{ label: 'OnHold', value: 'OnHold' },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor readable change.

Suggested change
{ label: 'OnHold', value: 'OnHold' },
{ label: 'On Hold', value: 'OnHold' },

@GrahamS-Quartech GrahamS-Quartech merged commit 0949974 into main Feb 15, 2024
9 checks passed
@GrahamS-Quartech GrahamS-Quartech deleted the PIMS-680-AdminUsersViewUI branch February 15, 2024 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants