2016-06-23 11:42:10 +02:00
|
|
|
maxMembers = @query.except(:offset, :limit, :order).count
|
2016-05-31 17:01:26 +02:00
|
|
|
|
2016-05-30 15:39:19 +02:00
|
|
|
json.array!(@members) do |member|
|
2016-05-31 17:01:26 +02:00
|
|
|
json.maxMembers maxMembers
|
2016-05-30 15:39:19 +02:00
|
|
|
json.id member.id
|
|
|
|
json.email member.email if current_user
|
|
|
|
json.profile do
|
|
|
|
json.first_name member.profile.first_name
|
|
|
|
json.last_name member.profile.last_name
|
|
|
|
json.phone member.profile.phone
|
|
|
|
end
|
|
|
|
json.group do
|
|
|
|
json.name member.group.name
|
|
|
|
end
|
|
|
|
json.subscribed_plan do
|
|
|
|
json.partial! 'api/shared/plan', plan: member.subscribed_plan
|
|
|
|
end if member.subscribed_plan
|
|
|
|
end
|