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 79 forks source link

Filtered permissions data comp #1808

Open jng34 opened 3 weeks ago

jng34 commented 3 weeks ago

Fixes #1752

What changes did you make and why did you make them ?

Screenshots of Proposed Changes Of The Website

Visuals before changes are applied unchanged image
Visuals after changes are applied Screenshot 2024-10-23 111629 Screenshot 2024-10-23 211005 Screenshot 2024-10-24 230502
github-actions[bot] commented 3 weeks 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 jng34-filteredPermissionsDataComp development
git pull https://github.com/jng34/VRMS.git filteredPermissionsDataComp
vorleakyek commented 2 weeks ago

@trillium, can you confirm that the accessLevel in the dummy data object should be "admin" or "projectLead"?

const user = {
     _id: 1,
     name: {
         firstName: "John",
         lastName: "Doe"
     },
     accessLevel: "projectLead", // or "admin"
     email: "johndoe@hackforla.org",
     projects: ["Home Unite Us, VRMS"] 
}

From the user.model.js, the value "projectLead" is not in the enum.

accessLevel: { 
    type: String, 
    enum: ["user", "admin", "superadmin"], // restricts values to "user", "admin" and "superadmin"
    default: "user" 
  },

It looks like we have this roleOnProject property under the ProjectTeamMemberSchema.

const projectTeamMemberSchema = mongoose.Schema({
    userId: { type: String },                       // id of the user
    projectId: { type: String },                    // id of the project
    teamMemberStatus: { type: String },             // Active or Inactive
    vrmsProjectAdmin: { type: Boolean },            // does this team member have admin rights to the project in VRMS?
    roleOnProject: { type: String },                // Developer, Project Manager, UX, Data Science
...}) 

cc: @jng34, @JackHaeg

JackHaeg commented 2 weeks ago

Per @trillium recommend leaving values discussed above as-is, and making necessary adjustments in: https://github.com/hackforla/VRMS/issues/1801

vorleakyek commented 1 week ago

image

@trillium, can you confirm this is okay, or should this PR include the changes in #1798? It should link to "/users". But, for the purpose of testing without the changes in the other PR, it uses "/users/permission-search" instead.

cc: @JackHaeg, @jng34