Change the order in which votes are displayed to be in the order they were selected by the voter
Note that the `budget` parameter was added to the `delete_path` method so it works in the tests; on production, it worked because this component is only rendered on pages which already have the `budget` parameter. Co-authored-by: Javi Martín <javim@elretirao.net>
This commit is contained in:
@@ -28,6 +28,6 @@ class Budgets::Ballot::BallotComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def group_investments(group)
|
||||
ballot.investments.by_group(group.id)
|
||||
ballot.investments.by_group(group.id).sort_by_ballot_lines
|
||||
end
|
||||
end
|
||||
|
||||
@@ -18,6 +18,6 @@ class Budgets::Ballot::InvestmentForSidebarComponent < Budgets::Ballot::Investme
|
||||
end
|
||||
|
||||
def delete_path
|
||||
budget_ballot_line_path(id: investment.id, investments_ids: investment_ids)
|
||||
budget_ballot_line_path(budget, id: investment.id, investments_ids: investment_ids)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,6 +20,6 @@ class Budgets::Investments::MyBallotComponent < ApplicationComponent
|
||||
end
|
||||
|
||||
def investments
|
||||
ballot.investments.by_heading(heading.id)
|
||||
ballot.investments.by_heading(heading.id).sort_by_ballot_lines
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user