Add Drive Participant column to the donation details page (5590)#5598
Open
augustocbx wants to merge 1 commit into
Open
Add Drive Participant column to the donation details page (5590)#5598augustocbx wants to merge 1 commit into
augustocbx wants to merge 1 commit into
Conversation
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.
Resolves #5590
Description
The donation details page did not show the product drive participant, even though it is captured when creating a product drive donation. This adds a
Drive Participantcolumn to the donation summary table, betweenDonation SiteandStorage Location, as specified in the issue.The participant is displayed by business name, falling back to contact name — the same representation used in the participant dropdown on the donation form, so users see the same label they picked when creating the donation. When the donation has no participant, the column shows
N/A, consistent with the existingDonation SiteandStorage Locationcolumns.Implementation mirrors the existing
Donation#donation_site_view/#storage_viewpattern with a newDonation#drive_participant_view, backed by a newProductDriveParticipant#display_name.Type of change
How Has This Been Tested?
Added two request spec examples to
spec/requests/donations_requests_spec.rb(GET #show): one asserting the participant's business name appears in the new column positioned right afterDonation Site, and one assertingN/Afor a donation without a participant. Both were written first and failed before the change.bundle exec rspec spec/requests/donations_requests_spec.rb— 43 examples, 0 failuresbundle exec rspec spec/models/donation_spec.rb spec/models/product_drive_participant_spec.rb— 51 examples, 0 failuresbundle exec rspec spec/system/donation_system_spec.rb -e "When viewing an existing donation"— 4 examples, 0 failuresbundle exec rubocopon touched files andbundle exec erb_linton the view — no offensesScreenshots
Before / after screenshots coming in a follow-up comment.