2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-04-26 06:17:10 -04:00
|
|
|
Report.add_report('signups') do |report|
|
2019-03-29 05:54:56 -04:00
|
|
|
report.icon = 'user-plus'
|
|
|
|
|
2019-04-26 06:17:10 -04:00
|
|
|
group_filter = report.filters.dig(:group)
|
|
|
|
report.add_filter('group', default: group_filter)
|
|
|
|
|
|
|
|
if group_filter
|
|
|
|
basic_report_about report, User.real, :count_by_signup_date, report.start_date, report.end_date, group_filter
|
2019-03-29 05:54:56 -04:00
|
|
|
add_counts report, User.real, 'users.created_at'
|
|
|
|
else
|
|
|
|
report_about report, User.real, :count_by_signup_date
|
|
|
|
end
|
|
|
|
end
|