Commit Graph

12 Commits

Author SHA1 Message Date
Bertocq
efacd0def3 Make calculate_winners explicitly delayed
Why:

* As seen on preproduction and production environments on Madrid's fork. Budget::Result#calculate_winners is very costly when done to all headings for a given budget (as requested on Admin::BudgetsController#calculate_winners) but its not when done individually for only a heading (as requested on Budget::Investment#recalculate_heading_winners)

How:

* Removing `handle_asynchronously :calculate_winners` from bellow Budget::Result#calculate_winners definition, to avoid making any call delayed. And explicitly calling `.delay` only when needed (on Admin::BudgetsController#calculate_winners)
2017-07-10 15:12:14 +02:00
Bertocq
154cdac332 Add calculate_winners on Admin Budget controller, route and ability for admins 2017-06-25 15:47:04 +02:00
kikito
9e4b2fda89 Adds phases to form 2017-01-01 15:03:58 +01:00
kikito
34ee8c1c48 Makes Budgets editable, and makes their description editable with html 2016-12-29 16:21:42 +01:00
kikito
2f446cf056 Renames "open" to "current" to avoid issues with existing method called "open" 2016-12-13 12:39:53 +01:00
Juanjo Bazán
2d56415048 adds feature flag for admin/budgets management 2016-09-07 15:13:39 +02:00
Juanjo Bazán
0f7e23bec4 adds budget's groups & headings to admin 2016-08-03 20:23:41 +02:00
Juanjo Bazán
724ccf175c adds budget show to admin 2016-07-29 14:52:37 +02:00
Juanjo Bazán
49bc6533e8 adds explicit permission to admin to read budgets 2016-07-29 13:39:08 +02:00
Juanjo Bazán
6fce9df451 adds admin creation of budgets 2016-07-29 13:34:41 +02:00
Alberto Garcia Cabeza
b69308b770 Adds example content for admin budget new 2016-07-28 13:04:30 +02:00
Juanjo Bazán
1ad78d599e adds admin budgets index 2016-07-28 12:36:39 +02:00