Commit Graph

18 Commits

Author SHA1 Message Date
BertoCQ
d44db9cec4 Merge branch 'master' into feature/budget_phases 2018-01-16 17:47:47 +01:00
Bertocq
66691b644a Refactor Budget::PHASES constant to Budget::Phase::PHASE_KINDS 2018-01-16 12:18:13 +01:00
rgarcia
349780922d Add Budget.open scope
Before Budget.current could return multiple budgets, now there can only
be a single current_budget.

Adding the concept of open, which better reflects what the admin sees
in this page: A tab for open budgets and a tab for finished budgets
2018-01-15 22:01:59 +01:00
BertoCQ
6e96c8c057 Merge branch 'master' into feature/2275#destroy_budgets 2018-01-09 11:03:51 +01:00
Bertocq
03e1481fb1 Redirect admin to budget lists after editing a budget 2018-01-08 18:47:09 +01:00
Bertocq
799b96cc40 Add destroy action to admin budget controller 2018-01-08 18:21:45 +01:00
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