-
-
Save bogdan/7ba4267aa25b6e37eb44 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MasterReport < BaseReport | |
date_range_filters(:registered_at) | |
date_range_filters(:last_login_at) | |
date_range_filters(:last_applied_at) | |
date_range_filters(:last_community_comment_created_at) | |
date_range_filters(:resume_created_at) | |
date_range_filters(:last_seen_at) | |
integer_range_filters(:distributed_partners_count) | |
integer_range_filters(:postcards_count) | |
integer_range_filters(:postcard_members_count) | |
integer_range_filters(:active_social_contacts_count) | |
integer_range_filters(:recommended_jobs_count) | |
integer_range_filters(:undistributed_partners_count) | |
integer_range_filters(:external_applications_attached_count) | |
integer_range_filters(:external_applications_unattached_count) | |
filter(:resume_uploaded, :eboolean) do |value| | |
self.conditions(value ? "resume_id is not null" : "resume_id is null") | |
end | |
filter(:profile_completed, :eboolean) | |
filter(:disabled, :eboolean) | |
column(:name) do | |
self.owner.full_name | |
end | |
column(:email, :order => "users.email") do | |
self.owner.email | |
end | |
column(:disabled) | |
column(:last_seen_at) | |
column(:registered_at) | |
column(:last_login_at) | |
column(:registration_type) do | |
I18n.t(self.registration_type, :scope => "user.registration_type") | |
end | |
column(:profile_completed) | |
column(:location, :order => false) do | |
self.location.try(:title) | |
end | |
column(:resume, :order => "resume_id is not null") do | |
! self.resume_id.nil? | |
end | |
column(:resume_created_at) | |
column(:distributed_partners_count) | |
column(:undistributed_partners_count) | |
column(:money_generated) | |
column(:money_pending) | |
column(:matched_inferior_partners_count) | |
column(:postcards_count) | |
column(:postcard_members_count) | |
column(:active_social_contacts_count) | |
column(:last_community_comment_created_at) | |
column(:recommended_jobs_count) | |
column(:last_applied_at) | |
column(:external_applications_unattached_count) | |
column(:external_applications_attached_count) | |
column(:source) | |
column(:activity_url, :format => :url, :order => false) do | |
UrlService.community_user_feed_items_url(self.owner) | |
end | |
def scope | |
MasterReportEntry.includes(:owner, :location) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment