Adapt group step to single and multiple budget mode

Co-Authored-By: decabeza <alberto@decabeza.es>
This commit is contained in:
Julian Herrero
2020-03-15 06:51:52 +01:00
committed by Javi Martín
parent 0b81f7f621
commit 9fcae141a6
20 changed files with 132 additions and 42 deletions

View File

@@ -1,4 +1,4 @@
class Admin::BudgetsWizard::BudgetsController < Admin::BaseController
class Admin::BudgetsWizard::BudgetsController < Admin::BudgetsWizard::BaseController
include Translatable
include ImageAttributes
include FeatureFlags
@@ -6,8 +6,6 @@ class Admin::BudgetsWizard::BudgetsController < Admin::BaseController
load_and_authorize_resource
helper_method :budget_mode, :single_heading?
def new
end
@@ -48,16 +46,4 @@ class Admin::BudgetsWizard::BudgetsController < Admin::BaseController
def groups_index
admin_budgets_wizard_budget_groups_path(@budget, url_params)
end
def budget_mode
params[:mode]
end
def single_heading?
budget_mode == "single"
end
def url_params
budget_mode.present? ? { mode: budget_mode } : {}
end
end