-
Notifications
You must be signed in to change notification settings - Fork 20
feat(community): organization memberships and roster management #775
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
Open
axu-1
wants to merge
36
commits into
main
Choose a base branch
from
organization-memberships
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Fix Queue Sort Order (#640) * Added sort to queued tickets by start time * Fix sorted order for students view * Replace login icon, show "Sign In" text on mobile over icon (#637) Replaces the "login" icon with "account_circle" on all devices, and hides the icon on mobile/thin screens (width < 766px). Also includes multiple toolbar changes to account for the width. * Update dependencies to avoid broken build (#642) This commit updates angular to latest security releases. It also updates dompurify, for markdown, to not use latest version which breaks the build. * Prepare TA Applications for Spring 2025 (#641) * Work on Spring 2025 TA Applications (#643) * Prepare TA Applications for Spring 2025 * Fix Another Date Field * Add Application Date Start / End Editor for Terms (#644) * Prepare TA Applications for Spring 2025 * Fix Another Date Field * Add Application Start / End Editing --------- Co-authored-by: Ajay Gandecha <[email protected]> Co-authored-by: Andy Chan <[email protected]> Co-authored-by: Kris Jordan <[email protected]>
* Create design_doc.md * Update design_doc.md * Update design_doc.md
* Create organization member entity and pydantic models * Fix relationship between Organization and User entities * Create organization roster widget * Add organization api calls * Rename OrganizationMember to OrganizationMembership for clarity * Updated roster display based on current organization * Add GET API for organization roster Adds OrganizationMembership JS object to represent a single membership and creates a GET method to get a list of memberships, representing a roster for a club. * Add OrganizationMembership model and entity to init files * Update add_member_to_org backend api path * Import user profile models and adjust resolver model to support members field * Remove dummy data for WIP roster display * Add organization roster resolver to access service methods * Add fake test data and fix add_member * Update membership model to reflect backend no longer passing entire org object * Test for getting organization roster * Change add_member endpoint ResponseModel * Link resolver to TS component --------- Co-authored-by: anikaahmed114 <[email protected]> Co-authored-by: axfng <[email protected]> Co-authored-by: Amy Xu <[email protected]>
* Fix Queue Sort Order (#640) * Added sort to queued tickets by start time * Fix sorted order for students view * Replace login icon, show "Sign In" text on mobile over icon (#637) Replaces the "login" icon with "account_circle" on all devices, and hides the icon on mobile/thin screens (width < 766px). Also includes multiple toolbar changes to account for the width. * Update dependencies to avoid broken build (#642) This commit updates angular to latest security releases. It also updates dompurify, for markdown, to not use latest version which breaks the build. * Prepare TA Applications for Spring 2025 (#641) * Work on Spring 2025 TA Applications (#643) * Prepare TA Applications for Spring 2025 * Fix Another Date Field * Add Application Date Start / End Editor for Terms (#644) * Prepare TA Applications for Spring 2025 * Fix Another Date Field * Add Application Start / End Editing * Update Office Hours pre-reservation policy (#645) Shifting hours for a TA and fixing a miscoded reservation. * Remove Comma That Broke Everything (#646) * Pin all versions to minor releases (#648) --------- Co-authored-by: Ajay Gandecha <[email protected]> Co-authored-by: Andy Chan <[email protected]> Co-authored-by: Kris Jordan <[email protected]>
* Updated roster styling and membership role display * Refactor API into separate organization roster service Instead of placing organization roster management in the same code as organization details, it will be moved into its own service and injected in separately. This makes it easier to modify and expand to add filtering/editing logic and decouples it from the responsibility of fetching org metadata, which is fairly static and unrelated. This involves refactoring roster API methods into a separate OrganizationRoster service file. The details widget now passes org/user info and the service into the roster so that it can filter/perform operations within itself. The roster must still be fetched in the parent in case we eventually want to display membership on the details card or not render the roster for empty/non-rostered clubs (CS Dept). The service must also be present so we can join from the details page. * Add POST membership API method Fix backend API route to not include member_id * Add join button linked to API calls Add a join button that when clicked will add the current user to the roster. This does not yet refresh the view. * Add Body to backend imports to support request body parameters * Add error-trapping for add and remove member endpoints * Test all organization membership service functions * Add temporary user-facing error to frontend for joining an already joined organization --------- Co-authored-by: anikaahmed114 <[email protected]> Co-authored-by: Alanna423 <[email protected]>
* Add initial tech specs document Add a work-in-progress edition of the tech specs * Update tech specs document * Edit org roster's getting started for backend files --------- Co-authored-by: Alanna423 <[email protected]>
* Add DELETE API and methods to remove one or more members from an organization * Create api and service to change member role * Added editable roster interface * Update organization entity and model, create join type model, update demo data * Create pending status for organization role, update add member service call to support different organization join types * Refactor join status into MembershipRole and update tests * Accept membership requests * Change organization join type * Fix organization tests * Create and implement roster filter pipe * Added member request view * Af/backend update member role 23 (#29) * Create api and service to change member role * Update organization entity and model, create join type model, update demo data * Create pending status for organization role, update add member service call to support different organization join types * Refactor join status into MembershipRole and update tests * Accept membership requests * Change organization join type * Fix organization tests * Create and implement roster filter pipe --------- Co-authored-by: axfng <[email protected]> Co-authored-by: Alanna423 <[email protected]> * Created organization join request page * Added edit join type UI * Af/backend update member role 23 (#30) * Create api and service to change member role * Update organization entity and model, create join type model, update demo data * Create pending status for organization role, update add member service call to support different organization join types * Refactor join status into MembershipRole and update tests * Accept membership requests * Change organization join type * Fix organization tests * Create and implement roster filter pipe --------- Co-authored-by: axfng <[email protected]> Co-authored-by: Alanna423 <[email protected]> * Link delete API to frontend UI * Add update API and link to frontend Fix backend enum definition to accept roles as strings * Add join type editing functionality * Authorization backend * Admin permissions frontend --------- Co-authored-by: Amy Xu <[email protected]> Co-authored-by: axfng <[email protected]> Co-authored-by: anikaahmed114 <[email protected]> Co-authored-by: Alexander Feng <[email protected]>
* Add DELETE API and methods to remove one or more members from an organization * Create api and service to change member role * Added editable roster interface * Update organization entity and model, create join type model, update demo data * Create pending status for organization role, update add member service call to support different organization join types * Refactor join status into MembershipRole and update tests * Accept membership requests * Change organization join type * Fix organization tests * Create and implement roster filter pipe * Added member request view * Af/backend update member role 23 (#29) * Create api and service to change member role * Update organization entity and model, create join type model, update demo data * Create pending status for organization role, update add member service call to support different organization join types * Refactor join status into MembershipRole and update tests * Accept membership requests * Change organization join type * Fix organization tests * Create and implement roster filter pipe --------- Co-authored-by: axfng <[email protected]> Co-authored-by: Alanna423 <[email protected]> * Created organization join request page * Added edit join type UI * Af/backend update member role 23 (#30) * Create api and service to change member role * Update organization entity and model, create join type model, update demo data * Create pending status for organization role, update add member service call to support different organization join types * Refactor join status into MembershipRole and update tests * Accept membership requests * Change organization join type * Fix organization tests * Create and implement roster filter pipe --------- Co-authored-by: axfng <[email protected]> Co-authored-by: Alanna423 <[email protected]> * Link delete API to frontend UI * Add update API and link to frontend Fix backend enum definition to accept roles as strings * Add join type editing functionality * Authorization backend * Admin permissions frontend * View roster's edit button only with admin permissions * Update tech spec document for SP02 * Fix roster button disabled/initial states for better user flow Disable save/remove buttons unless form is dirty Initialize chip with current role * Refactor update membership to only update memberships that have been changed * Show accepted requests on roster tab without refreshing * Auto accept/reject existing requests when join type is changed No longer display pending members in roster tab * Edit profile interface to add organizations field * Update user details to return names of organizations joined * Edited join button type * Added button for closed organization join type * Join button immediately reflects changes of joining/applying * Update demo data * Join button only disables if the user successfully joins/applies * Revert demo data * Use first letter of name for roster --------- Co-authored-by: axfng <[email protected]> Co-authored-by: anikaahmed114 <[email protected]> Co-authored-by: Alanna423 <[email protected]> Co-authored-by: Alexander Feng <[email protected]>
* Fix Queue Sort Order (#640) * Added sort to queued tickets by start time * Fix sorted order for students view * Replace login icon, show "Sign In" text on mobile over icon (#637) Replaces the "login" icon with "account_circle" on all devices, and hides the icon on mobile/thin screens (width < 766px). Also includes multiple toolbar changes to account for the width. * Update dependencies to avoid broken build (#642) This commit updates angular to latest security releases. It also updates dompurify, for markdown, to not use latest version which breaks the build. * Prepare TA Applications for Spring 2025 (#641) * Work on Spring 2025 TA Applications (#643) * Prepare TA Applications for Spring 2025 * Fix Another Date Field * Add Application Date Start / End Editor for Terms (#644) * Prepare TA Applications for Spring 2025 * Fix Another Date Field * Add Application Start / End Editing * Update Office Hours pre-reservation policy (#645) Shifting hours for a TA and fixing a miscoded reservation. * Remove Comma That Broke Everything (#646) * Pin all versions to minor releases (#648) --------- Co-authored-by: Ajay Gandecha <[email protected]> Co-authored-by: Andy Chan <[email protected]> Co-authored-by: Kris Jordan <[email protected]>
…add-organization-memberships
…entity-adjustments
…organization-memberships-backend
…organization-memberships
…l/csxl.unc.edu into organization-memberships-backend
…organization-memberships
…l/csxl.unc.edu into organization-memberships-backend
Update Organization Memberships Backend
Use custom titles and admin toggle instead of discrete roles and permissions Move service one level higher to reflect shared use across components
Add modal dialog to be used when editing memberships
Add joining and leaving methods and buttons to access them Change membership editing logic in widget to reflect new schema
Added for files that did not exist prior, or to which roster related business logic was added.
Update branch for pull request
8 tasks
Collaborator
|
So sorry I'm just now seeing this you all! I'll put a reminder to review this PR by the end of this weekend! Thanks for finishing this! |
Member
|
@ItIsAndrewL / @axu-1 apologies for the delay here, we are pausing this PR for now due to larger refactors! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds the frontend interface to support the organization roster feature, with backend previously reviewed/tested in #712.
User stories for this pull request:
Students:
Admin:
Major changes (frontend)
Added an organization roster service which handles the HTTP CRUD requests of memberships.
Added an organization roster widget which uses the service and includes logic for accept/reject/update/delete memberships.
All dirty state is managed internally, only the final save button sends the service request to the backend.
Added a dialog to support the editor interface.
Injected the roster service into the organization detail card to support joining, leaving and viewing exec of an organization.
Added an event carousel component to display the events of an organization.
What is not supported:
Functional avatars and navigating to profiles
Batch membership updates for titles or admin perms
Batch accepts or rejects (can be possible with small change)
Granular permissions and/or premade types of club positions
Editing or using the term of the membership for any additional logic (don't have a good user story defined for what a user would want to/should do with it)
This PR was the combined work of Anika Ahmed, Alex Feng, Amy Xu, Alanna Zhang during FA24 COMP423 and SP25. I have added as much attribution as I remember, but it can be changed depending on the guidelines for credit. I apologize for the delay in getting this PR open!