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

Side Drawer to handle Org and group navigations #18

Open
pratik0204 opened this issue May 29, 2020 · 7 comments
Open

Side Drawer to handle Org and group navigations #18

pratik0204 opened this issue May 29, 2020 · 7 comments
Assignees
Labels

Comments

@pratik0204
Copy link
Contributor

pratik0204 commented May 29, 2020

Is your feature request related to a problem? Please describe.
Create a full screen side drawer UI (a slidable component ,not a container component)
Screenshot from 2020-06-02 19-57-04

Describe the solution you'd like

components/sideDrawer/sideDrawer.js

Functional component which takes in:
1.Organisation List Object.
2.Each Org object have an object of permission set for the user logged in, and an object of groups of that organisation.

components/sideDrawer/sideDrawer.stories.js

State data-

{
 org1:{
       info:{
           name: " ",
           tagline:" ",
           about:" ",
           ...org_stats(can leave for now)
            },
       groups:{
               g1:{
                    ...group data
                   },
               g2:{
                    ...group data
                  }
       },
       user_permissions:{
               ....permission_set (booleans)
       }    
   },

 org2:{
       info:{
           name: " ",
           tagline:" ",
           about:" ",
           ...org_stats(can leave for now)
            },
       groups:{
               g1:{
                    ...group data
                   },
               g2:{
                    ...group data
                  }
            },
       user_permissions:{
               ....permission_set (booleans)
           }    
   }
}

1. Loading State.

2.Initial_State:
Make 3-4 organisation with different types of permission set to check the component render.

3.Error State(show an error message, and ask to refresh)

Additional context-

Note- Make sure to check all the active links in the below picture, you can check the prototype for the same as mentioned below-
https://www.figma.com/proto/fUXz5ux7ImURWcnLTgAE1J/Untitled?node-id=24%3A7&scaling=min-zoom

click

  1. The 4 boxes at the top which helps switching the org, for that use menu form MUI.
  2. The flag button beside the boxes, takes to a new page and show the org details.. (No need to do this).

But what can be done-
In the State Data mentioned above, have track of current organisation and current_group-

{ 
    ...state_data_mentioned_above,
    active_org: "Org 1",
    active_grp: "Volunteers"
}

active_grp will help you to show the green dot as shown in above pictures.
active_org will help you filter through organisations, to show the correct org data, when we switch orgs.

  1. The Create group button can be enabled disabled based on the permission set passed in the state data.

(no other variations)

If you wish to change something please do write it in comments

@pratik0204
Copy link
Contributor Author

@rajesh6161 this issue is assigned to you.

@pratik0204
Copy link
Contributor Author

@rajesh6161 the issue is updated, please have a look.

@naveennvrgup
Copy link
Contributor

instead of orgs dict it will be a list. same applies for group 😇

@rajesh6161
Copy link
Member

rajesh6161 commented Jun 3, 2020

Sir what's the use of permission set here and also clicking on groups will open something or a new page.
Sir yeh groups saare dikhne hain ki only those whose he is part of?

@pratik0204
Copy link
Contributor Author

@rajesh6161
The permission set will help to let you now, whether the user will be able to create groups or not, so based on it, you can see the button beside the groups heading, will be enabled or disabled.
You can check tht in the prototype in volunteer login.

All the groups will be visible, just make the group names clickable.

@pratik0204
Copy link
Contributor Author

@rajesh6161 the orgs and grps will be a list, not a dictionary, I've made the changes in the issue.

@rajesh6161 rajesh6161 mentioned this issue Jun 14, 2020
13 tasks
@naveennvrgup
Copy link
Contributor

i am taking over this issue due to few changes in the backend

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants