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