Skip to content

Adding reimbursement status badge#7055

Open
Jberma23 wants to merge 1 commit into
rubyforgood:mainfrom
Jberma23:Jberma23-7041-reimbursement-requests-ui-tweak
Open

Adding reimbursement status badge#7055
Jberma23 wants to merge 1 commit into
rubyforgood:mainfrom
Jberma23:Jberma23-7041-reimbursement-requests-ui-tweak

Conversation

@Jberma23

@Jberma23 Jberma23 commented Jul 15, 2026

Copy link
Copy Markdown

What github issue is this PR for, if any?

Addresses #7041

What changed, and why?

Added a ui feature to let volunteers know the current state of reimbursements to reduce emails to supervisors

How is this tested? (please write rspec and jest tests!) 💖💪

Added new unit tests in spec/system/case_contacts/index_spec.rb and spec/decorators/case_contact_decorator_spec.rb to cover the new added content/feature

Screenshots please :)

Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.
Screenshot 2026-07-15 at 12 19 30 PM
Screenshot 2026-07-15 at 12 22 05 PM

@github-actions github-actions Bot added 🧪 Tests Tests ruby Touches Ruby code erb Touches ERB templates labels Jul 15, 2026
@Jberma23
Jberma23 marked this pull request as ready for review July 15, 2026 22:03
<span class="badge badge-pill light-bg text-black">Draft</span>
<% end %>
<% if contact.want_driving_reimbursement? %>
<% decorated_contact = contact.decorate %>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caching contact.decorate in a local variable here is actually a nice improvement over how the rest of this partial handles it, worth considering decorating once at the top of this partial and reusing it everywhere, rather than just in this new block. From what I see, right now contact.decorate gets called fresh four separate times above this (medium_icon_classes, contact_groups, contact_types, subheading), each one allocating a new decorator instance, and this renders once per case contact on the page, so it adds up across however many rows are showing. Not a blocker, but would be nice for anyone touching this file again, pulling the decoration to the top and reusing your variable throughout would clean up an existing inefficiency.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could totally be done in a separate PR dedicated exclusively to improvements, and then testing the corresponding pieces that were touched.

@arielsalcepk arielsalcepk left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great to me! Thanks for adding this one so quickly 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

erb Touches ERB templates ruby Touches Ruby code 🧪 Tests Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants