VRMS icon indicating copy to clipboard operation
VRMS copied to clipboard

New fetch logic

Open bkmorgan3 opened this issue 10 months ago • 3 comments

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

Screenshot 2024-04-16 at 3 28 05 PM

Visuals after changes are applied

Screenshot 2024-04-16 at 2 00 58 PM

bkmorgan3 avatar Apr 16 '24 22:04 bkmorgan3

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

github-actions[bot] avatar Apr 16 '24 22:04 github-actions[bot]

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

JackHaeg avatar Apr 23 '24 02:04 JackHaeg

@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.

bkmorgan3 avatar Apr 29 '24 22:04 bkmorgan3

My rebase / merge game is not tight

bkmorgan3 avatar May 26 '24 20:05 bkmorgan3