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

Rh/make access consistent #1327

Merged
merged 31 commits into from
Oct 5, 2023
Merged

Rh/make access consistent #1327

merged 31 commits into from
Oct 5, 2023

Conversation

laholstege
Copy link
Contributor

@laholstege laholstege commented Oct 4, 2023

sorry this one is so long! there was a lot to do to get it in line with the rest of our code. lots of state stuff in react–i don't expect that will be easy to follow reading but i tried to make it as clear as i could. if you could test and see if you find bugs on the /access/list as well as /person/details that would be great

makes access components match the pattern of other assets.

  • adds details modal for individual access assignments, in same pattern as key serials

  • makes 'em pretty

  • removes nested/recursive access state–at most, access.assignments[0].access will be populated, instead of access.assignments[0].access.assignments[]...

  • when on /access/ (AccessContainer) we will have access with fully populated .assignments (which will not have a nested access)

  • when on /people/ (AccessAssignmentContainer) we will have assignments[] with a populated .access (which will not have nested assignments)
    -when on /people/ (AccessAssignmentContainer, calling access/listAssigned, we only pull the assignments for that person, and pass numberOfAssignments for the list to use

  • fixes a lot of small bugs, bad handling of state, clarifies names

known weird/less than ideal behavior

  • when on /person/details, if you assign an access it has an incorrect "number of assignments" value in the table until refresh. this is because in AccessController, we do not pass back the accesses, so assignments.length on the frontend is wrong. could pass back all the assignments (seems unnecessary), could add a property of numberOfAssignments, could just delete the column in the list, or just do nothing about it.
    - still have some nested state under person details, but intending to fix this next

<div className='row justify-content-between'>
<h3>Equipment Details</h3>
<div className='row justify-content-between'>
<h3>Equipment Details</h3>
Copy link
Member

Choose a reason for hiding this comment

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

I don't know that this is needed if we are creating a new equipment.
It has the Create New Equipment title when we do that.
image

Copy link
Member

@jSylvestre jSylvestre left a comment

Choose a reason for hiding this comment

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

Assign access person lookup appears broke:
image

@laholstege laholstege merged commit 4f8dc93 into master Oct 5, 2023
6 checks passed
@laholstege laholstege deleted the RH/make-access-consistent branch October 5, 2023 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants