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

Auto Accept PR 2: Frontend & Waiting List Integration #10416

Open
wants to merge 85 commits into
base: main
Choose a base branch
from

Conversation

dunkOnIT
Copy link
Contributor

@dunkOnIT dunkOnIT commented Dec 11, 2024

Frontend Changes

  • Give organizers a way to toggle auto-accept off
  • Add disable auto accept button for organizers when auto accept is enabled
  • Add enable/disable auto accept settings in the competition form
  • Make the "Disable Auto Accept" button actually do something when it is clicked, to indicate whether or not auto accept was successfully disabled

Backend Changes

  • Auto-accept users onto waiting list when Accepted is full
    • Should they be accepted onto the waiting list if the auto-accept-cutff has been reached? No - consulted people on discord
  • Auto-accept users from waiting list if a spot becomes available in the accepted list (ie, if an attendee's status changes away from accepted
  • Add bulk auto accept class method
  • Add bulk auto accept route
  • Test if registration history and state change emails get created/sent as expected

Future PR

  • Move waiting list to above the accepted list if it has at least one registration || competitor_limit has been reached | auto_accept is enabled and auto_accept_disable_threshold has been reached
  • Warn an organizer if they're trying to accept a user from the Pending list while there are registrations on the Waiting List
  • Give organizers a way to toggle auto-accept on
  • Give organizers a way to run a bulk auto-accept
  • Automatically run bulk auto-accept when auto-accept is toggled on
    • Warn organizers this will happen, and give them an "Are you sure?" dialogue, where saying "No" will

@dunkOnIT
Copy link
Contributor Author

dunkOnIT commented Dec 12, 2024

Waiting list:

  • Accept a user from the waiting list if a spot becomes available on the Accepted list
  • Model Tests
    • allow auto-accepting the first position on the waiting list
  • Integration Tests
    • Trigger an auto_accept job from the competing lane if a user's status changes away from accepted

@dunkOnIT
Copy link
Contributor Author

Add to waiting list:

  • If the Accepted list is full, accept users onto the Waiting List
    • What if the auto_accept_disable threshold is reached?

@dunkOnIT
Copy link
Contributor Author

Bulk auto accept class method tests:

  • Accepts competitors from the waiting list
    • in order of waiting list
  • Accepts pending competitors
    • in order of payment
  • Accepts up to but not exceeding the competition limit
    • those not accepted follow the expected order (later on waiting list = not accepted, later payment = not accepted)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like someone executed npm install when it should have been yarn install? 😈

Copy link
Contributor Author

@dunkOnIT dunkOnIT Feb 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I think I've fixed it? Just removed package-lock.json

EDIT: I still need to run yarn install / restart my container, which I'll do in a few hours when I'm off mobile data in case it wants to download a lot

@dunkOnIT
Copy link
Contributor Author

@kr-matthews would you be able to help resolve the merge conflict in RegistrationAdministrationList? Particularly in line ~580 - it seems like how we render the lists may have changed?

@kr-matthews
Copy link
Contributor

@kr-matthews would you be able to help resolve the merge conflict in RegistrationAdministrationList? Particularly in line ~580 - it seems like how we render the lists may have changed?

Will take a look tomorrow. The headings/lists have just been moved from the return to an array, the contents should all be the same.

@kr-matthews
Copy link
Contributor

@kr-matthews would you be able to help resolve the merge conflict in RegistrationAdministrationList? Particularly in line ~580 - it seems like how we render the lists may have changed?

The import conflict is easy to fix: accordion, button, and icon should all be new imports.
For the other one, I think git might only be confused because you added a few new lines within the return, but the surrounding lines were moved in my work. If you remove those new lines (before trying to merge with main), the conflict will probably go away?
image

@dunkOnIT
Copy link
Contributor Author

Thanks, conflicts resolved!

@dunkOnIT dunkOnIT closed this Feb 18, 2025
@dunkOnIT dunkOnIT reopened this Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Give organizers the option to automatically accept registrations up to the competitor limit
4 participants