Allow enabling/disabling phases in budgets wizard

So now there's no need to edit each phase individually to enable/disable
them.

We aren't doing the same thing in the form to edit a budget because we
aren't sure about possible usability issues. On one hand, in some tables
we automatically update records when we mark a checkbox, so users might
expect that. On the other hand, having a checkbox in the middle of a
form which updates the database automatically is counter-intuitive,
particularly when right below that table there are other checkboxes
which don't update the database until the form is submitted.

So, either way, chances are users would think they've updated the phases
(or kept them intact) while the opposite would be true.

In the form within the wizard to create a budget that problem isn't that
important because there aren't any other fields in the form and it's
pretty intuitive that what users do will have no effect until they press
the "Finish" button.

Co-Authored-By: Julian Nicolas Herrero <microweb10@gmail.com>
This commit is contained in:
Javi Martín
2021-06-06 15:57:22 +02:00
parent eb77d09425
commit f110e65f80
10 changed files with 80 additions and 9 deletions

View File

@@ -78,7 +78,9 @@ namespace :admin do
resources :headings, only: [:index, :create, :edit, :update, :destroy]
end
resources :phases, as: "budget_phases", only: [:index, :edit, :update]
resources :phases, as: "budget_phases", only: [:index, :edit, :update] do
collection { patch :update_all }
end
end
end