Commit Graph

8352 Commits

Author SHA1 Message Date
rgarcia
34e0c23bb3 Fix valuators authorization spec
This spec used to pass, because even though there were no budgets, as
Budget.current returned an array, it gracefully handled situations
without budgets

Now we assume that there can only be a single current budget, and so
calling any method of budget will raise an exception unless there is a
current budget present

Valuators should not access this page when there is no budget present,
however it might be wise to create an issue to cover this case, just in
case
2018-01-15 22:02:05 +01:00
rgarcia
5086314bee Display only current budget for Valuators
Before we could have multiple current budgets, as we now only have one
current_budget, some specs broke.

As there is no need to display multiple budgets to Valuators, only the
current budget is necessary, we can remove arrays and assume that only
a single budget, the current budget, is displayed to Valuators
2018-01-15 22:02:04 +01:00
rgarcia
01ef439053 Display only current budget to Managers printing investments
In the specs, some investment were missing a heading_id, thus creating
another unexpected budget

By explicitly setting the heading_id we can control better which
budgets are created in each test
2018-01-15 22:02:04 +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
rgarcia
be554a629c Make current_budget accessible in controller and views 2018-01-15 19:13:45 +01:00
rgarcia
9176de949a Refactor concept of current budget
When there was only one budget this implementation worked fine

Nowadays there can be multiple budgets, and therefore the definition of
the current_budget has changed. It is no longer a budget that has not
finished, but rather, the last budget created that is not in the
initial drafting phase.

Budgets in the drafting phase are not considered the current_budget,
but rather a budget that is still being prepared and that soon will
become the current_budget
2018-01-15 19:13:37 +01:00
BertoCQ
77e10ac297 Merge pull request #2315 from consul/remove/on_hold
Remove deprecated on hold from Budget phase context
2018-01-15 10:55:40 +01:00
Bertocq
7179dbbba0 Remove deprecated on hold budget phase group, no longer used in code 2018-01-14 20:41:24 +01:00
rgarcia
7ccb506d64 Update Changelog 2018-01-12 20:10:18 +01:00
Alberto García
1b2992ce99 Merge pull request #2297 from consul/budgets-ui
Budgets UI
2018-01-11 17:59:55 +01:00
decabeza
ba63a91ce7 removes comments 2018-01-11 17:09:54 +01:00
decabeza
a39f5eb691 adds help text for population field on new heading form 2018-01-11 17:08:39 +01:00
decabeza
ddcd5eb2e0 Merge branch 'budgets-ui' of https://github.com/consul/consul into budgets-ui 2018-01-11 17:07:11 +01:00
decabeza
40d32f3e16 Merge branch 'master' into budgets-ui 2018-01-11 17:05:28 +01:00
rgarcia
c76b099971 Update Changelog 2018-01-11 14:03:17 +01:00
Raimond Garcia
b0bd7792be Merge pull request #1917 from wairbut-m2c/iagirre-admin-budget-heading-action
Actions for budgets' headings added. Edit headings, delete headings i…
2018-01-11 13:47:27 +01:00
rgarcia
55aa5bfdfb Update Changelog 2018-01-11 12:24:07 +01:00
Raimond Garcia
43ba27c9cf Merge pull request #1908 from wairbut-m2c/aperez-split-routes-file
Split 'routes.rb' file into multiple small files
2018-01-11 12:20:42 +01:00
Bertocq
1fee0eb2aa Update unreleased section of changelog 2018-01-10 23:48:13 +01:00
BertoCQ
71e045fece Merge pull request #2296 from consul/feature/2278#budget_price_show_phase
New Budget's phase to publish investment prices
2018-01-10 23:46:41 +01:00
Bertocq
3026115382 Remove redundant curly braces around a hash parameter 2018-01-10 22:44:11 +01:00
Bertocq
db051beabc Fix to_not to not_to on spec 2018-01-10 22:43:52 +01:00
decabeza
e819da5556 improve i18n for budgets notices 2018-01-10 22:27:22 +01:00
decabeza
4c272a0e3a fixes specs 2018-01-10 22:27:22 +01:00
decabeza
46666c4b01 add i18n and fix layout for download current selection 2018-01-10 22:27:21 +01:00
decabeza
f4de83da2d fixes vertical align on support/price on index list 2018-01-10 22:25:41 +01:00
decabeza
baeef5e1e8 fixes typo 2018-01-10 22:25:41 +01:00
decabeza
8dd41325be hide budget investment table heading if no results 2018-01-10 22:25:09 +01:00
decabeza
daf30c5423 fixes i18n 2018-01-10 22:17:33 +01:00
decabeza
dc15269f63 changes text proposal to projects 2018-01-10 22:17:26 +01:00
decabeza
d6ef5d3ed4 updates text 2018-01-10 22:17:26 +01:00
decabeza
cf2a732e3d improves messages on header 2018-01-10 22:17:26 +01:00
decabeza
c704d100cc reorders elements like proposals/show 2018-01-10 22:17:26 +01:00
decabeza
ddcfc73e86 shows supports number on bold 2018-01-10 22:17:26 +01:00
decabeza
930ee26cd7 updates texts proposals to investment project 2018-01-10 22:17:26 +01:00
decabeza
04c2c3f884 fixes author actions on sidebar 2018-01-10 22:17:26 +01:00
decabeza
6f922621a9 adds help text for population field on admin budgets groups 2018-01-10 22:17:26 +01:00
decabeza
b8b3ce87f3 fixes label name of group on admin budgets groups 2018-01-10 22:17:25 +01:00
Bertocq
88741b9179 Improve investment links at budget list with target blank 2018-01-10 22:09:06 +01:00
María Checa
c6bc69cf49 Merge pull request #2298 from consul/investments_fix
Investments fix
2018-01-10 17:00:14 +01:00
Bertocq
760b7ca4c8 Fix indentations and lines lenght 2018-01-10 14:17:48 +01:00
iagirre
0e11e21b2a Merged with master and solved conflicts 2018-01-10 13:23:39 +01:00
iagirre
f0724ce13a Changes suggested in the PR made 2018-01-10 13:13:05 +01:00
María Checa
02f7e423fe Improved tests 2018-01-10 13:03:52 +01:00
María Checa
bc363289ad Added translations to link text 2018-01-10 12:19:48 +01:00
María Checa
a06abf7650 Removed unnecessary code 2018-01-10 11:57:23 +01:00
María Checa
eda673a85d Restored missing code 2018-01-10 11:57:13 +01:00
decabeza
27c4abf552 improve i18n for budgets notices 2018-01-10 11:37:05 +01:00
decabeza
3b6fa6cbb4 fixes specs 2018-01-10 11:36:33 +01:00
Bertocq
334091710c Refactor price & explanation showing logic at Investment model 2018-01-10 11:26:16 +01:00