VRMS
VRMS copied to clipboard
New fetch logic
Fixes #1619
What changes did you make and why did you make them ?
This PR might open up a few further questions. First, Can we guarantee that a User will only PM one project? I hardcoded a fetch based off only 1 ID in a users Managed Projects array. That would introduce a slippery slope of additional requests if there are more than one. if, 2, if 3, etc.
- I added a check for accessLevel and fetch project info accordingly
- render the name of the project(s)
Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)
Visuals before changes are applied
Visuals after changes are applied
Want to review this pull request? Take a look at this documentation for a step by step guide!
From your project repository, check out a new branch and test the changes.
git checkout -b bkmorgan3-new-fetch-logic development
git pull https://github.com/bkmorgan3/VRMS.git new-fetch-logic
Per Trillium - Changes requested:
- [ ] Drop yarn lock changes
- [x] Configure fetch call to accept multiple projects (U
- filter the list server side
- OR Add query perimeters to the MongoDB call
@Spiteless I opted for filtering on server because I didn't find a way to use multiple calls to Mongo. For testing a PM for 2 ids I used this user.managedProjects.push("6453dfff390bc1002ab3eb6d") inside the check where user?.accessLevel !== 'admin, line 53ish in ProjectList.
My rebase / merge game is not tight