worldcubeassociation.org
worldcubeassociation.org copied to clipboard
Support "Maximum Number of Events" restriction for Favourites competitions
Is your feature request related to a problem? Please describe. For Favourites competitions (or Favorites is you're from the U.S.), organizers need to manually restrict the number of events a competitor registers for.
Examples:
- https://www.worldcubeassociation.org/competitions/OshawaFavourites2022
- https://www.worldcubeassociation.org/competitions/SnoCoFavorites2022
- https://www.worldcubeassociation.org/competitions/SacCubingXI2022
The website should be able to do this automatically.
Describe the solution you'd like
- When you have the "I would like to restrict competitors from registering for specific combinations of events" checkbox selected, there should be a field that allows you to restrict the maximum number of events a competitor may register for (let's call this
M
). - The value
M
must be an integer between1
andN-1
whereN
is the total number of events at the competition. - When a competitor has more than
M
events selected, restrict them from registering for the competition (this should apply to the competitor's initial registration and updates to a registration either by the competitor or the organizers).- On the frontend, we can leverage the existing error state, but update for a maximum number of events allowed:
- On the frontend, we can leverage the existing error state, but update for a maximum number of events allowed:
Additional context The implementation might have some similarity to https://github.com/thewca/worldcubeassociation.org/issues/7059 since we're enforcing an integer-based restriction on registrations.