Skip to content

Commit

Permalink
[#rubyforgood#6174] added metrics for logged contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
Raushan Kumar Raman committed Jan 26, 2025
1 parent 0b6219e commit ac5d77a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/health_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def monthly_unique_users_graph_data
monthly_counts_of_volunteers = LoginActivity.joins("INNER JOIN users ON users.id = login_activities.user_id AND login_activities.user_type = 'User'").where(users: {type: "Volunteer"}, success: true).group_by_month(:created_at, format: "%b %Y").distinct.count(:user_id)
monthly_counts_of_supervisors = LoginActivity.joins("INNER JOIN users ON users.id = login_activities.user_id AND login_activities.user_type = 'User'").where(users: {type: "Supervisor"}, success: true).group_by_month(:created_at, format: "%b %Y").distinct.count(:user_id)
monthly_counts_of_casa_admins = LoginActivity.joins("INNER JOIN users ON users.id = login_activities.user_id AND login_activities.user_type = 'User'").where(users: {type: "CasaAdmin"}, success: true).group_by_month(:created_at, format: "%b %Y").distinct.count(:user_id)
monthly_logged_counts_of_volunteers = CaseContact.joins(:supervisor_volunteer).group_by_month(:created_at, format: "%b %Y").distinct.count(:creator_id)
monthly_logged_counts_of_volunteers = CaseContact.joins(supervisor_volunteer: :volunteer).group_by_month(:created_at, format: "%b %Y").distinct.count(:creator_id)

monthly_line_graph_combined_data = first_day_of_last_12_months.map do |month|
[
Expand Down

0 comments on commit ac5d77a

Please sign in to comment.