Skip to content

Instantly share code, notes, and snippets.

@aronmoshe-m
Last active August 4, 2023 17:42
Show Gist options
  • Save aronmoshe-m/3edbef79c025554611cc174c59775efa to your computer and use it in GitHub Desktop.
Save aronmoshe-m/3edbef79c025554611cc174c59775efa to your computer and use it in GitHub Desktop.
Community Volunteer Events

Summary

Unlike a company event, which can only be associated with one company, a community event is a new event type that is visible across multiple companies. A community event can receive user signups from any company that is associated with it, and functions almost identically to a company event — except that it is for more than one company at a time.

Business requirements

Community events:

  • always belong to multiple companies
  • will show in every company platform that the event is associated with
  • can accept users from any associated company for event signup
  • may have the number of participants caped (like company events) and the cap applies across all companies (e.g., a cap of 50 participants is reached if one company has 40 signups and another company has 10 signups)
  • will not be editable in the Admin dashboard UI
  • will only show a company's users in the participants area of the UI (e.g., will not show one company who is signed up from another company)
  • will only allow participant management of the company's users (e.g., will not let one company manage another company's users)
  • will only count a company's users toward the company's metrics (e.g., a community event may have 100 hours volunteered across all participants but if a company's users only account for 50 of those hours, the company will only have their hour total increase by 50)

Also, community events:

  • are only created in Rails Admin, not in the Admin dashboard UI
  • must be distinguishable on the frontend from a standard company event

Implementation notes

A community event and a company event have so much overlap that we don't yet see the purpose of creating a separate model for community events. Therefore, all changes will be made to the Event model.

  • update association between event and company to has_and_belongs_to_many
  • new method on model (community_event?) to check if event has greater than one company associated with it for use by frontend for UI differentiation between community and company event types --> could be a boolean or enum instead to differentiate but I'm not sure this is necessary yet
  • two new scopes for list view of events in Rails Admin: company event and community event
@aronmoshe-m
Copy link
Author

aronmoshe-m commented Aug 1, 2023

Updated requirements (after call with MoJo and Joel on 1 Aug 2023)

Changes to requirements:

  • Community events cannot have their participants managed. A company admin should be able to view/download their participants for a community event but should not be able to manage them (add or delete participants)

Net new requirements:

  • CS needs to be able to easily see the following somewhere (could be in the UI or in Rails Admin):
    • Total number of signups for a community event
    • Total number of remaining spots for a community event
  • CS needs to be able to download a participants list (users with EventSignup associated with the community event) that includes: [1] first name [2] last name [3] email [4] associated company

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment