2017-08-30 15:29:45 +08:00
|
|
|
json.team_details do
|
2017-08-31 21:56:55 +08:00
|
|
|
json.team do
|
|
|
|
json.id team.id
|
|
|
|
json.name team.name
|
|
|
|
json.created_at team.created_at
|
|
|
|
json.created_by "#{team.created_by.full_name} (#{team.created_by.email})"
|
|
|
|
json.space_taken team.space_taken
|
|
|
|
json.description team.description
|
|
|
|
end
|
2017-08-30 22:18:21 +08:00
|
|
|
json.users team_users do |team_user|
|
|
|
|
json.id team_user.user.id
|
2017-08-31 21:56:55 +08:00
|
|
|
json.name team_user.user.full_name
|
|
|
|
json.email team_user.user.email
|
2017-08-30 22:18:21 +08:00
|
|
|
json.role team_user.role_str
|
|
|
|
json.created_at I18n.l(team_user.created_at, format: :full_date)
|
|
|
|
json.status team_user.user.active_status_str
|
|
|
|
json.actions do
|
2017-10-19 16:35:53 +08:00
|
|
|
json.currentRole team_user.role_str
|
|
|
|
json.teamUserId team_user.id
|
2017-09-12 23:30:13 +08:00
|
|
|
json.disable team_user.user == current_user
|
2017-08-30 22:18:21 +08:00
|
|
|
end
|
2017-08-30 15:29:45 +08:00
|
|
|
end
|
|
|
|
end
|