1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-04 15:24:23 +01:00
fab-manager/app/views/api/machines/_machine.json.jbuilder

23 lines
638 B
Plaintext
Raw Permalink Normal View History

2022-10-28 17:13:41 +02:00
# frozen_string_literal: true
2022-12-27 16:14:29 +01:00
json.extract! machine, :id, :name, :slug, :disabled, :machine_category_id, :reservable
2022-10-28 17:13:41 +02:00
if machine.machine_image
json.machine_image_attributes do
json.id machine.machine_image.id
json.attachment_name machine.machine_image.attachment_identifier
json.attachment_url machine.machine_image.attachment.large.url
2022-10-28 17:13:41 +02:00
end
end
if machine.advanced_accounting
json.advanced_accounting_attributes do
json.partial! 'api/advanced_accounting/advanced_accounting', advanced_accounting: machine.advanced_accounting
end
end
2023-07-28 16:16:44 +02:00
if machine.space_id
json.space do
json.name machine.space.name
end
end