mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-29 18:52:22 +01:00
dont compute member list if not complete
This commit is contained in:
parent
18c1f19840
commit
1383483a54
@ -252,10 +252,12 @@ class StatisticService
|
|||||||
|
|
||||||
def members_list(options = default_options)
|
def members_list(options = default_options)
|
||||||
result = []
|
result = []
|
||||||
User.with_role(:member).where('users.created_at >= :start_date AND users.created_at <= :end_date', options).each do |u|
|
User.with_role(:member).includes(:profile).where('users.created_at >= :start_date AND users.created_at <= :end_date', options).each do |u|
|
||||||
result.push OpenStruct.new({
|
if !u.need_completion?
|
||||||
date: options[:start_date].to_date
|
result.push OpenStruct.new({
|
||||||
}.merge(user_info(u)))
|
date: options[:start_date].to_date
|
||||||
|
}.merge(user_info(u)))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user