opcotech / elemo

The next-generation project management platform.
https://elemo.app
GNU Affero General Public License v3.0
7 stars 5 forks source link

Add organization member listing #156

Open gabor-boros opened 2 months ago

gabor-boros commented 2 months ago

Summary

The front-end lacks showing organization member listing on the organization details page (/settings/organizations/[slug]), however, all the pieces that are needed to implement showing the member list are available.

By this point, the organization details should be in the related slice on the front-end, including the teams (or roles) of the organization. Unfortunately, the organization members are not stored with their team details, so it must be fetched separately, one by one. This is not the most efficient, especially not for several teams, but for the MVP it is “good enough”.

Since the Organization API returns only the team IDs that the organization have, to get the team details, a call must be made to the Organization Roles API which returns the team details. To get the members of a given team, use the Organization Role Members API. The endpoint returns the list of members per role. These calls are independent (as both requires the organization ID and/or role ID, which is already available).

With the information returned from these APIs, add the list of members with the following details about them below the company details: profile picture, name, email, status. Either group the members by their role or add a badge next to their name with the role name. The members which has “deleted” status should be listed as well, however, those members should be at the bottom of the list. If the current user is in the list, mark it with a green “you” badge next to its name. The badge is available locally in Storybook.

There is no need to bother with member management (add/remote/change role). That's not in scope for this issue.

Blocked on #155.

End-to-end tests are not strictly necessary, but highly welcomed.

Example Use-cases

Drawbacks

As we have no endpoint to return the list of members combined with their roles, the load time for that page will be bad, but not unmanageable.

Karankhatik commented 3 weeks ago

Hey @gabor-boros I find this project really interesting and would like to contribute to it. Could you please assign it to me so that I can start working on it?

gabor-boros commented 3 weeks ago

Hey @Karankhatik 👋

That's great to hear! Sure I can assign it to you, but I want to let you know that I'm going to push a complete refactor of the front-end in a few days.

It may worth waiting for that PR.