Skip to content

Day of week registration#216

Merged
toomuchpete merged 28 commits into
masterfrom
day-of-week-registration
May 19, 2026
Merged

Day of week registration#216
toomuchpete merged 28 commits into
masterfrom
day-of-week-registration

Conversation

@toomuchpete
Copy link
Copy Markdown
Member

No description provided.

toomuchpete and others added 28 commits May 5, 2026 22:04
Two-day leagues will offer one-day vs. two-day registration choice via
an interstitial after gRank, with attendance prompts suppressed for the
non-chosen day and a per-row badge in management/drafting views.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
22 tasks: model fields and validations, league form, interstitial
view, controller flow, attendance prompt suppression, captain dashboard
muted rows, drafting/CSV/JSON visibility, commissioner edit path,
end-to-end smoke + manual sweep.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When game_days contains invalid day names, return early after adding
the invalid-names error so the duplicate check doesn't fire redundantly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds the `attending_days` Array field to Registration, along with
single_day?, chosen_day, registration_type_label, participates_on?,
and day_choice_editable? helpers. Includes full RSpec coverage.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Passes single_day? flag to league.get_price so registrations with one
attending day are priced at price_single_day rather than the full price.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When a league requires_day_choice?, the register action now redirects to
choose_days before rendering the registration form — both for fresh
registrations and for resumed registering registrations with blank
attending_days.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds GET choose_days (renders day-choice interstitial) and POST
submit_day_choice (validates, atomically persists attending_days, clears
price for pre-pay registrations, redirects by flow). Both reject when
the league has started. Authorization rules updated and stub view added.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
AttendancePromptWorker#process_initial_for now checks each player's
Registration#participates_on? against the game day label before creating
a prompt, so tuesday-only players are skipped on Thursday games. Legacy
players with nil attending_days are unaffected. Four new RSpec examples
cover the Thursday-only, Tuesday-only, both-days, and nil-attending_days
cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…shboard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
After a successful league update, detect active/waitlisted/registering
registrations whose attending_days contain days no longer in game_days
and surface a flash[:warning] naming the affected players. Also adds
flash[:warning] rendering to all three application layouts (Bootstrap
alert-warning class) since only notice/error were previously handled.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a `load_day_choice_registration` helper to `LeaguesController` so
that both `choose_days` and `submit_day_choice` accept an optional
`registration_id` param when the caller has `:manage` permission on the
league, enabling commissioner-initiated day-choice changes from the
player-management UI. Adds a "Change Type" button and registration-type
display to the player detail panel in `players.html.erb`.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@toomuchpete toomuchpete merged commit bac2a11 into master May 19, 2026
3 checks passed
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.

1 participant