Update Referrals page to list more partner info

This commit is contained in:
Seth Call 2025-03-21 18:45:29 -05:00 committed by Nuwan
parent f4c71f9778
commit a687356d72
4 changed files with 13 additions and 7 deletions

View File

@ -464,7 +464,7 @@ GEM
oj (3.1.3) oj (3.1.3)
optimist (3.0.1) optimist (3.0.1)
orm_adapter (0.5.0) orm_adapter (0.5.0)
pg (0.17.1) pg (0.21.0)
pg_array_parser (0.0.9) pg_array_parser (0.0.9)
pleaserun (0.0.31) pleaserun (0.0.31)
cabin (> 0) cabin (> 0)
@ -748,7 +748,7 @@ DEPENDENCIES
net-ssh net-ssh
nokogiri (= 1.10.10) nokogiri (= 1.10.10)
oj (= 3.1.3) oj (= 3.1.3)
pg (= 0.17.1) pg (= 0.21.0)
postgres-copy (= 0.6.0) postgres-copy (= 0.6.0)
postgres_ext postgres_ext
protected_attributes protected_attributes

View File

@ -8,12 +8,17 @@ ActiveAdmin.register JamRuby::User, :as => 'Referrals' do
config.filters = true config.filters = true
filter :affiliate_referral filter :affiliate_referral
filter :email
## scope("Has Signups", default: true) { |scope| scope.where('visits != 0 or signups != 0').order('day desc') }
index do index do
column 'User' do |oo| link_to(oo.name, oo.admin_url, {:title => oo.name}) end column 'User' do |oo| link_to(oo.name, oo.admin_url, {:title => oo.name}) end
column 'Email' do |oo| oo.email end column 'User Email' do |oo| oo.email end
column 'Created' do |oo| oo.created_at end column 'Created' do |oo| oo.created_at end
column 'Partner' do |oo| oo.affiliate_referral.display_name end column 'Partner ID' do |oo| oo.affiliate_referral.id end
column 'Partner Name' do |oo| oo.affiliate_referral.display_name end
column 'Partner User' do |oo| link_to(oo.affiliate_referral.partner_user.name, admin_user_path(oo.affiliate_referral.partner_user.id), { :title => oo.affiliate_referral.partner_user.name }) end
end end
controller do controller do

View File

@ -519,7 +519,7 @@ GEM
paypal-sdk-merchant-jk (1.118.1) paypal-sdk-merchant-jk (1.118.1)
paypal-sdk-core (~> 0.3.0) paypal-sdk-core (~> 0.3.0)
pdf-core (0.7.0) pdf-core (0.7.0)
pg (0.17.1) pg (0.21.0)
pg_array_parser (0.0.9) pg_array_parser (0.0.9)
pleaserun (0.0.31) pleaserun (0.0.31)
cabin (> 0) cabin (> 0)
@ -868,7 +868,7 @@ DEPENDENCIES
omniauth-stripe-connect omniauth-stripe-connect
omniauth-twitter omniauth-twitter
paypal-sdk-merchant-jk (= 1.118.1) paypal-sdk-merchant-jk (= 1.118.1)
pg (= 0.17.1) pg (= 0.21.0)
postgres-copy postgres-copy
postgres_ext postgres_ext
prawn-table prawn-table
@ -936,7 +936,7 @@ DEPENDENCIES
zip-codes zip-codes
RUBY VERSION RUBY VERSION
ruby 2.3.1p112 ruby 2.4.1p111
BUNDLED WITH BUNDLED WITH
1.17.3 1.17.3

View File

@ -3,6 +3,7 @@
#REAL_IP=192.168.0.42 #REAL_IP=192.168.0.42
REAL_IP=127.0.0.1 REAL_IP=127.0.0.1
REAL_IP=192.168.5.204 REAL_IP=192.168.5.204
REAL_IP=127.0.0.1
if [ ! -z "$1" ]; then if [ ! -z "$1" ]; then
REAL_IP="$1" REAL_IP="$1"
fi fi