Add some useful filters
This commit is contained in:
parent
7b6a571550
commit
93dc5ccd35
|
|
@ -15,6 +15,9 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
|
|||
#filter :partner_user
|
||||
filter :partner_name
|
||||
filter :id
|
||||
filter :jamtracks_sold
|
||||
filter :subscriptions_count
|
||||
filter :current_quarter_in_cents
|
||||
|
||||
scope("Sorted By Current Quarter", default: true) { |scope| scope.where('partner_user_id IS NOT NULL').order('current_quarter_in_cents desc') }
|
||||
scope("Sorted By Jamtracks Sold", default: false) { |scope| scope.where('partner_user_id IS NOT NULL').order('jamtracks_sold desc') }
|
||||
|
|
@ -28,6 +31,7 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
|
|||
helper 'active_admin/subscription'
|
||||
end
|
||||
|
||||
|
||||
form do |f|
|
||||
f.inputs 'Fields' do
|
||||
f.input(:partner_name, :input_html => { :maxlength => 128 })
|
||||
|
|
@ -74,7 +78,6 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
|
|||
div do
|
||||
sprintf("Sub $%.2f", oo.subscriptions_cumulative_earnings_in_dollars)
|
||||
end
|
||||
|
||||
end
|
||||
column 'Current Quarter' do |oo|
|
||||
div do
|
||||
|
|
@ -115,6 +118,7 @@ ActiveAdmin.register JamRuby::AffiliatePartner, :as => 'Affiliates' do
|
|||
row :address
|
||||
row :tax_identifier
|
||||
row :paypal_id
|
||||
row :venmo_user_id
|
||||
row :jamtracks_sold
|
||||
row :subscriptions_count
|
||||
row :cumulative_earnings_in_dollars
|
||||
|
|
|
|||
Loading…
Reference in New Issue