Extract component to render links to event stats

This commit is contained in:
Javi Martín
2024-04-23 23:51:05 +02:00
parent 646dccca0a
commit 4e9ed4dfa6
4 changed files with 24 additions and 14 deletions

View File

@@ -15,14 +15,6 @@ module StatsHelper
data
end
def graph_link_text(event)
text = t("admin.stats.graph.#{event}")
if text.to_s.match(/translation missing/)
text = event
end
text
end
def budget_investments_chart_tag(opt = {})
opt[:data] ||= {}
opt[:data][:graph] = admin_api_stats_path(budget_investments: true)