-
Notifications
You must be signed in to change notification settings - Fork 45
[Card Grants] Home page reordering #10674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
data-event-sort-organizer-positions-value="<%= @organizer_positions.pluck(:id).to_json %>" | ||
data-action="sortable:stop->event-sort#sort" | ||
> | ||
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data-event-sort-organizer-positions-value="<%= @organizer_positions.pluck(:id).to_json %>" | |
data-action="sortable:stop->event-sort#sort" | |
> | |
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> | |
data-event-sort-organizer-positions-value="<%= @organizer_positions.pluck(:id).to_json %>" | |
data-action="sortable:stop->event-sort#sort"> | |
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> |
data-sort-card-card-grant-value="<%= current_user.card_grants.activated.pluck(:id).to_json %>" | ||
data-action="sortable:stop->card-grant#sort" | ||
> | ||
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data-sort-card-card-grant-value="<%= current_user.card_grants.activated.pluck(:id).to_json %>" | |
data-action="sortable:stop->card-grant#sort" | |
> | |
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> | |
data-sort-card-card-grant-value="<%= current_user.card_grants.activated.pluck(:id).to_json %>" | |
data-action="sortable:stop->card-grant#sort"> | |
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> |
… corresponding data attributes in index.html.erb
data-sort-card-order-value='<%= current_user.card_grants.includes(:stripe_card).map(&:hashid).to_json %>' | ||
data-action="sortable:stop->sort-card#sort" | ||
> | ||
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
data-sort-card-order-value='<%= current_user.card_grants.includes(:stripe_card).map(&:hashid).to_json %>' | |
data-action="sortable:stop->sort-card#sort" | |
> | |
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> | |
data-sort-card-order-value='<%= current_user.card_grants.includes(:stripe_card).map(&:hashid).to_json %>' | |
data-action="sortable:stop->sort-card#sort"> | |
<% current_user.card_grants.includes(:stripe_card).activated.each do |grant| %> |
Is there an associated issue / feature request / user story behind this PR I can reference for more context? I'm thinking a better way to organize card grants might be just creating a new page for them. |
honestly I just came up with this randomly because I felt it's sometimes inconvenient to scroll through all the YSWS grants I was issued |
Currently, you can reorder organizations on your HCB homepage. This PR extends that functionality by enabling sorting for card grants as well.
Work in progress