HOLD: Add admin CRUD for payments with filtering and manage registrants integration#1282
Open
HOLD: Add admin CRUD for payments with filtering and manage registrants integration#1282
Conversation
…agement Payments track financial transactions (Stripe, check, scholarship, etc.) linked to payers, organizations, and event registrations. The index page supports filtering by payer, organization, event, and status via remote-select search boxes. The manage registrants view now shows payment status badges that link to the filtered payments index for that payer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The EventRegistration model now has `belongs_to :payment` (singular) instead of `has_many :payments`. Updated the ticket partial to match. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests were written for the old polymorphic has_many :payments model. Updated to use belongs_to :payment (singular) and column-based scholarship_recipient? instead of payment-type-derived scholarship?. Also adds scholarship_tasks_completed? check to joinable? so scholarship recipients must complete tasks before accessing videoconference links. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test queried EventRegistration.last before the Turbo stream had finished processing, causing nil. Adding a Capybara wait for the link ensures the POST completes before the Ruby-side DB lookup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
I think we should have a full chat about payments as well as look at using the pay gem before we get too deep in this. |
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
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.
What is the goal of this PR and why is this important?
How did you approach the change?
Model & associations:
belongs_to :payer(Person), optionalbelongs_to :organization,has_many :event_registrationsbelongs_to :payment, optional: true(direct FK, not join table)has_many :payments, dependent: :nullifynormalizeson stripe fields to convert empty strings to nilsearch_by_paramsclass method for filtering by status, payer_id, organization_id, event_idController & views:
payments_path(payer_id: ...)Migrations:
event_registrations.payment_idFKtype: :integerto match organizations table PK typeTests:
:with_organizationtraitUI Testing Checklist
Anything else to add?
RemoteSearchableto support the event filter on payments index🤖 Generated with Claude Code