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

Create the "User Permission Search" screen #1752

Open
12 tasks done
Tracked by #1737
JackHaeg opened this issue Sep 23, 2024 · 4 comments · May be fixed by #1808
Open
12 tasks done
Tracked by #1737

Create the "User Permission Search" screen #1752

JackHaeg opened this issue Sep 23, 2024 · 4 comments · May be fixed by #1808
Assignees
Labels
p-feature: User Permissions Feature includes how user access levels / user permissions will be implemented in the product role: Front End size: 1pt Can be done in 4-6 hours time-sensitive should be solved as soon as possible

Comments

@JackHaeg
Copy link
Member

JackHaeg commented Sep 23, 2024

Overview

Currently, there is no way for admins to see a list of other admins on the VRMS app, or a list of users with Project Management (PM) access to specific projects. We need to create a "User Permission Search" screen, which will host these features.

Requirements

Details

  • Design the skeleton of this page: ( See page 2 of mockups ):

    • Page is contained within the "Users" tab on VRMS.
    • "User Permission Search" title at the top of the screen,
    • "Admins" and "Project Leads" filter (similar to our existing "User Search" screen)
      • NOTE - Although this filter component with both "Admins" and "Project Leads" can be created for design purposes, we are aiming to create only a functioning "Admins" component first, as this is highest priority.
    • A search bar below the filter buttons (similar to our existing "User Search" screen), which will have different functions depending on the filter selected (i.e., user selects "Admins" or "Project Leads" and is presented with a different search experience)
    • Depending on filter selection ("Admins" or "Project Leads"), Admins = this screen will display a list of all admin users on VRMS, "Project Leads" = a list of all Project Leads (project managers) and their linked projects (alphabetical order based on project name and then below the search bar.
    • List of Admins (alphabetical order based on first name of user)
    • List of Project Leads (alphabetical order based on first name of user)
    • Default view on this screen will display the "Admins" filter as selected with a list of all VRMS admin users underneath the search bar - more on this in Create Search Display Component #1753

Action Items

  • Create "User Permission Search" page using dummy data (refer to page 2 of Low Fi Mockup)
  • Add to routes
    • /users/permission-search
  • Create state for admin / Project Leads button with "Admin" as default.
  • Create dummy data
  • Create dummy component (defined inside this component will be replaced later)
  • Filter dummy data based on Admin permission or PM permission (tied to the Admin / Project Leads button).
  • Pass filter data to dummy component in prop called "data"
  • Pass prop type as a string that either = admin or projectLeads
  • User Permission Search consists of two slugs: /users/permission-search/admin and /users/permission-search/projects
  • When navigating to /users/permission-search that page will change the navigation to add /admin by default (i.e., /users/permission-search/admin), that state is dependent on the toggle box selected between /projects and /admin
    • Note: this should not be a navigating trigger, this is meant to be a soft update of the URL.

Resources/Instructions

Screenshot of User Permission Search Screen mockups

Screenshot 2024-10-07 at 8 30 51 PM

@github-project-automation github-project-automation bot moved this to New Issue Approval in P: VRMS: Project Board Sep 23, 2024
@JackHaeg JackHaeg added role: Front End draft Not ready for prioritization yet size: 1pt Can be done in 4-6 hours p-feature: User Permissions Feature includes how user access levels / user permissions will be implemented in the product labels Sep 24, 2024
@JackHaeg JackHaeg changed the title Create the "User Permission Management" screen. Create the "User Permission Management" screen Oct 1, 2024
@JackHaeg JackHaeg added the ready for dev lead Add to issue when dev lead needs to take some action label Oct 1, 2024
@JackHaeg JackHaeg removed ready for dev lead Add to issue when dev lead needs to take some action draft Not ready for prioritization yet labels Oct 15, 2024
@JackHaeg JackHaeg added the time-sensitive should be solved as soon as possible label Oct 15, 2024
@vorleakyek vorleakyek self-assigned this Oct 19, 2024
@vorleakyek vorleakyek moved this from Prioritized Backlog to In progress in P: VRMS: Project Board Oct 19, 2024
@jng34 jng34 assigned jng34 and unassigned vorleakyek Oct 19, 2024
@JackHaeg JackHaeg changed the title Create the "User Permission Management" screen Create the "User Permission Search" screen Oct 22, 2024
@jng34
Copy link
Member

jng34 commented Oct 25, 2024

@JackHaeg @trillium

Filtering Project Leads

Hey all, I was able to filter the Project Leads in alphabetical order according to their project names and then first name, as per the action item mentioned:

- Depending on filter selection ("Admins" or "Project Leads"), Admins = this screen will display a list of all admin users on VRMS, "Project Leads" = a list of all Project Leads (project managers) and their linked projects (alphabetical order based on project name and then below the search bar.

The dummy data I used was an array of users with the following structure (meant to mirror the current VRMS user object):

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

I looped through all the users and for each project in projects array, push a modified user object
const modifiedUser = { ...user, project: "projectName" } into a tempArray and then finally map each modified user in the frontend tempArray.map((u) => <ListItem>{u.name.firstName} {u.project}</ListItem>). The code is not exact here, so I'm not sure if this makes sense.

I was wondering if there was a more efficient way to do it, or should I continue by creating a pull request so someone can review the code? All other actionable items are complete.

@vorleakyek
Copy link
Member

@jng34, maybe it's good to create a PR for this so that I can take a look at your code because I plan to work on #1754, which is related to your work. Thanks!

cc: @trillium, @JackHaeg

jng34 added a commit to jng34/VRMS that referenced this issue Oct 29, 2024
@JackHaeg
Copy link
Member Author

@trillium provided guidance during Monday All Team call, @jng34 to implement recommendations and submit PR

jng34 added a commit to jng34/VRMS that referenced this issue Oct 29, 2024
@jng34 jng34 linked a pull request Oct 29, 2024 that will close this issue
@jng34
Copy link
Member

jng34 commented Oct 29, 2024

@trillium Issue has been resolved! I was able to run git pull vrms development and then continue to create the PR. I think one of those commands did the trick. Thanks!

cc: @JackHaeg @vorleakyek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p-feature: User Permissions Feature includes how user access levels / user permissions will be implemented in the product role: Front End size: 1pt Can be done in 4-6 hours time-sensitive should be solved as soon as possible
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

4 participants