Current goal indicator
Indicator with current goal and the supports required to achieve it has been added
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class ProposalsDashboardController < Dashboard::BaseController
|
||||
helper_method :proposal_dashboard_action
|
||||
helper_method :proposal_dashboard_action, :next_goal_supports
|
||||
|
||||
def index
|
||||
authorize! :dashboard, proposal
|
||||
@@ -61,4 +61,8 @@ class ProposalsDashboardController < Dashboard::BaseController
|
||||
def proposal_dashboard_action
|
||||
@proposal_dashboard_action ||= ProposalDashboardAction.find(params[:id])
|
||||
end
|
||||
|
||||
def next_goal_supports
|
||||
ProposalDashboardAction.next_goal_for(proposal)&.required_supports || Setting["votes_for_proposal_success"]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user