fixed 组织成员数取组织内成员和组织所有仓库成员组合

This commit is contained in:
2024-01-29 16:05:04 +08:00
parent 0e8a3ddb79
commit d2663eb7b7
3 changed files with 26 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
json.id org_user.id
json.id user&.id
json.user do
json.partial! "organizations/user_detail", user: org_user.user
json.partial! "organizations/user_detail", user: user
end
json.team_names org_user.teams.pluck(:nickname)
json.created_at org_user.created_at.strftime("%Y-%m-%d")
json.team_names user.teams.where("teams.organization_id=?", organization.id).pluck(:nickname)
json.created_at user.created_on.strftime("%Y-%m-%d")

View File

@@ -1,5 +1,5 @@
json.total_count @organization_users.total_count
json.organization_users @organization_users do |org_user|
next if org_user.user.blank?
json.partial! "detail", org_user: org_user, organization: @organization
json.total_count @users.total_count
json.organization_users @users do |user|
next if user.blank?
json.partial! "detail", user: user, organization: @organization
end