-
-
Save bogdan/8b91694edec900de84be 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 DailyReports < BaseReport | |
column(:date) | |
column(:new_users) | |
column(:total_users) | |
column(:profiles_completed) | |
column(:resumes_uploaded) | |
column(:repeat_visitors) | |
column(:viewed_jobs) | |
column(:liked_jobs, :url => Proc.new {|model| | |
UrlService.liked_admin_reports_daily_report_path(:date => model.date.to_s, :format => :csv) | |
}) | |
column(:applied_jobs, :url => Proc.new{|model| | |
UrlService.applied_admin_reports_daily_report_path(:date => model.date.to_s, :format => :csv) | |
}) | |
column(:postcards_sent) | |
column(:comments_shared) | |
column(:new_applications_autotracked) | |
column(:total_applications_autotracked) | |
column(:resumes_sent_to_partners) | |
filter(:year, :enum, :select => (2010..Date.today.year), :include_blank => "") do |value| | |
self.conditions(["extract(year from date) = ?", value]) | |
end | |
filter(:month, :enum, :select => Date::MONTHNAMES.enum_for(:each_with_index).collect {|name, index| [name, index]}, :include_blank => false) do |value| | |
self.conditions(["extract(month from date) = ?", value]) | |
end | |
scope do | |
DailyReport | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment