Commit Graph

10 Commits

Author SHA1 Message Date
voodoorai2000
5856af03a5 Fix exception when no available milestones
We were getting an exception when quering[1] for milestones which were not present, due to for example having a publication date later than today

Adding a `try` statement and spec to avoid this situation

[1] 82efc3dd66/app/controllers/budgets/executions_controller.rb (L16)
2018-11-07 18:08:10 +01:00
María Checa
126941a335 Change headings reorder method 2018-11-06 13:02:35 +01:00
María Checa
d089cc14a5 Add logic to handle budget investments with an execution process 2018-11-06 13:02:35 +01:00
Marko Lovic
997db67104 Refactor how headings are ordered 2018-11-06 13:02:35 +01:00
Marko Lovic
375fbf775f Order non-city headings by alphabetical order 2018-11-06 13:02:35 +01:00
Marko Lovic
4758c1b91a Show city heading in first position on executions list 2018-11-06 13:02:35 +01:00
rgarcia
685927116c Query for all investments, not only winner investment
Spending proposals did not have a winner attribute, instead winners
where calculated dynamically looking at votes

Removing this condition, so that we can see investment for the 2016
participatory budget which used spending proposals
2018-11-06 13:02:35 +01:00
Marko Lovic
8376efce3f Hide headings with no investments
The page should not show any headings which don't have any
winning investments. The "no content" message should only be
shown when there are no headings with investments to avoid an
otherwise blank page.

__Note:__ in the main @headings query, _both_ #includes and #joins
are needed to:
 1. eager load all necessary data (#includes)
and
 2. to perform an INNER JOIN on milestones to filter out investments
with no milestones (#joins).
2018-11-06 13:02:35 +01:00
Angel Perez
5de74ea6f1 Load budget headings on budgets/executions#show action 2018-11-06 13:02:34 +01:00
Angel Perez
3e6cbc9505 Add basic frontend for budget executions list 2018-11-05 18:04:38 +01:00