hackforla / VRMS

Volunteer Relationship Management System: This is an ambitious project to create a system that will help us measure our human capital development, reduce repetitive tasks and processes, and improve outcomes.
GNU Affero General Public License v3.0
40 stars 73 forks source link

New fetch logic #1627

Open bkmorgan3 opened 1 month ago

bkmorgan3 commented 1 month ago

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.

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](https://github.com/hackforla/VRMS/assets/22487388/3eb47d6e-bc6c-4055-b19d-4ddb98591e08)
Visuals after changes are applied ![Screenshot 2024-04-16 at 2 00 58 PM](https://github.com/hackforla/VRMS/assets/22487388/24eb5380-2e62-44cf-9290-5a8fc165cc1a)
github-actions[bot] commented 1 month ago

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
JackHaeg commented 4 weeks ago

Per Trillium - Changes requested:

bkmorgan3 commented 3 weeks ago

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