Adapt phases step to single and multiple budget mode
Co-Authored-By: decabeza <alberto@decabeza.es>
This commit is contained in:
committed by
Javi Martín
parent
e3510fc29d
commit
4c6de86a72
@@ -4,6 +4,8 @@
|
||||
|
||||
<%= render "shared/errors", resource: phase %>
|
||||
|
||||
<%= render Admin::BudgetsWizard::ModelFieldComponent.new %>
|
||||
|
||||
<fieldset>
|
||||
<legend aria-describedby="phase_duration_description">
|
||||
<%= t("admin.budget_phases.edit.duration") %>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
<td>
|
||||
<%= render Admin::TableActionsComponent.new(phase,
|
||||
actions: [:edit],
|
||||
edit_path: edit_path(phase),
|
||||
edit_text: t("admin.budgets.edit.edit_phase")
|
||||
) %>
|
||||
</td>
|
||||
|
||||
@@ -37,4 +37,10 @@ class Admin::BudgetPhases::PhasesComponent < ApplicationComponent
|
||||
tag.span t("shared.no"), class: "budget-phase-disabled"
|
||||
end
|
||||
end
|
||||
|
||||
def edit_path(phase)
|
||||
if helpers.respond_to?(:single_heading?) && helpers.single_heading?
|
||||
edit_admin_budgets_wizard_budget_budget_phase_path(budget, phase, helpers.url_params)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user