[CardGrant] Add large banner when transactions decline#13239
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a prominent warning callout on card grant transaction pages when a decline occurs due to a disallowed merchant, guiding users to contact the issuing organization.
Changes:
- Detect
:merchant_not_alloweddeclines in card grant transactions. - Render a warning callout above the transaction table with guidance to contact the event team.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
garyhtou
reviewed
Mar 20, 2026
YodaLightsabr
previously requested changes
Mar 22, 2026
| <% if hcb_codes&.any? %> | ||
| <h2 class="heading h2 leading-[1.5] mt2 ml0 pt1 pb1 pr2">Transactions on this card</h2> | ||
|
|
||
| <% if hcb_codes.any? { |hc| hc.canonical_pending_transactions.any? { |pt| pt.hcb_decline_reason == :merchant_not_allowed } } %> |
Contributor
There was a problem hiding this comment.
I think it might be better to move this logic to the controller and include this is its own partial directly on the show page.
Co-authored-by: yodalightsabr <yoda@yodacode.xyz>
…thub.com/hackclub/hcb into mxg-add-large-callout-to-card-grant-page
garyhtou
approved these changes
Mar 30, 2026
Was moved to its own partial. logic is now simple enough that we can keep it in the partial.
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.
Closes #13215
Preview