mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-12 23:09:03 +01:00
25 lines
559 B
Ruby
25 lines
559 B
Ruby
# frozen_string_literal: true
|
|
|
|
json.id user.user_id || user.id
|
|
json.extract! user, :email, :full_name, :first_name, :last_name, :created_at
|
|
if user.user
|
|
json.gender user.user.statistic_profile.gender ? 'man' : 'woman'
|
|
else
|
|
json.gender 'man'
|
|
end
|
|
|
|
json.invoicing_profile_id user.id
|
|
json.external_id user.external_id
|
|
json.organization !user.organization.nil?
|
|
json.address user.invoicing_address
|
|
|
|
if user&.user&.group
|
|
json.group do
|
|
if user.user.group_id?
|
|
json.extract! user.user.group, :id, :name, :slug
|
|
else
|
|
json.nil!
|
|
end
|
|
end
|
|
end
|