Implements 182. resources are shown as cards in dashboard progress view.
Implements #182

Implements 182. resources are shown as cards in dashboard progress view.
This commit is contained in:
Juan Salvador Pérez García
2018-07-04 18:08:35 +02:00
parent 9f0ca0cec7
commit caffd97cc8
11 changed files with 123 additions and 14 deletions

View File

@@ -1,5 +1,5 @@
class ProposalsDashboardController < Dashboard::BaseController
helper_method :proposal_dashboard_action
helper_method :proposal_dashboard_action, :active_resources
def index
authorize! :dashboard, proposal
@@ -54,8 +54,11 @@ class ProposalsDashboardController < Dashboard::BaseController
private
def proposal_dashboard_action
@proposal_dashboard_action ||= ProposalDashboardAction.find(params[:id])
end
def active_resources
ProposalDashboardAction.active.resources.order(required_supports: :asc, day_offset: :asc)
end
end