2022-11-08 16:20:34 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
json.extract! space, :id, :name, :description, :slug, :default_places, :disabled
|
|
|
|
if space.space_image
|
|
|
|
json.space_image_attributes do
|
|
|
|
json.id space.space_image.id
|
|
|
|
json.attachment_name space.space_image.attachment_identifier
|
2023-11-10 15:59:21 +01:00
|
|
|
json.attachment_url space.space_image.attachment.large.url
|
2022-11-08 16:20:34 +01:00
|
|
|
end
|
|
|
|
end
|
2022-11-10 16:14:49 +01:00
|
|
|
|
|
|
|
if space.advanced_accounting
|
|
|
|
json.advanced_accounting_attributes do
|
|
|
|
json.partial! 'api/advanced_accounting/advanced_accounting', advanced_accounting: space.advanced_accounting
|
|
|
|
end
|
|
|
|
end
|
2023-07-28 16:16:44 +02:00
|
|
|
|
|
|
|
json.machines space.machines do |machine|
|
|
|
|
json.name machine.name
|
|
|
|
end
|