small indentation

This commit is contained in:
Harry Bomrah 2016-06-03 18:36:03 +08:00
parent b53e1797e7
commit eb8037a99b
1 changed files with 15 additions and 14 deletions

View File

@ -129,20 +129,21 @@ module Admin::PersonalConferencesHelper
conference.member_profile = mp
conference.save
end
def get_data_for_excel(year_start,year_end)
data = []
roles = Role.where(:disabled => false, :title.ne => "", :title.ne => nil).asc(:key)
roles.each do |role|
d = {}
d["name"] = role.title
mps = role.member_profile_ids
d1 = DateTime.new(year_start,1,1,0,0)
d2 = DateTime.new(year_end,12,31,23,59)
d["data"] = WritingConference.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps) rescue []
data << d
end
return data
end
def get_data_for_excel(year_start,year_end)
data = []
roles = Role.where(:disabled => false, :title.ne => "", :title.ne => nil).asc(:key)
roles.each do |role|
d = {}
d["name"] = role.title
mps = role.member_profile_ids
d1 = DateTime.new(year_start,1,1,0,0)
d2 = DateTime.new(year_end,12,31,23,59)
d["data"] = WritingConference.where(:publication_date.gte => d1, :publication_date.lte => d2, :member_profile_id.in => mps) rescue []
data << d
end
return data
end
def get_chart_data(year_start,year_end,role,type)
case type