VRFS-5690 - tag jamtrack and jammers separetly on admin report - fix jammers view

This commit is contained in:
Seth Call 2025-10-13 15:16:41 -05:00
parent c0031cfe3d
commit 828191d683
1 changed files with 4 additions and 2 deletions

View File

@ -52,8 +52,10 @@ ActiveAdmin.register_page "Jammers Subscription Cohorts" do
ORDER BY ORDER BY
j.created_at j.created_at
LIMIT 1 -- Select only that single row LIMIT 1 -- Select only that single row
) j ON (j.created_at - users.created_at) >= INTERVAL '2 hours' }) ) j ON TRUE })
.group("date_trunc('month', users.created_at)").order("date_trunc('month', users.created_at) DESC") do |row| .group("date_trunc('month', users.created_at)")
.where("j.created_at IS NULL OR (j.created_at - users.created_at) >= INTERVAL '2 hours'")
.order("date_trunc('month', users.created_at) DESC") do |row|
column "Month", Proc.new { |user| user.month.strftime('%B %Y') } column "Month", Proc.new { |user| user.month.strftime('%B %Y') }
column "Total", :total column "Total", :total
column "Subscribed", Proc.new { |user| raw(Spacer.spacer(user.subscribed, user)) } column "Subscribed", Proc.new { |user| raw(Spacer.spacer(user.subscribed, user)) }