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/availabilities/trainings.json.jbuilder

20 lines
594 B
Plaintext
Raw Normal View History

# frozen_string_literal: true
json.array!(@slots) do |slot|
2022-07-12 17:46:01 +02:00
json.partial! 'api/availabilities/slot', slot: slot, operator_role: @operator_role
json.borderColor trainings_events_border_color(slot)
json.is_completed slot.full?
json.nb_total_places slot.nb_total_places
2016-03-23 18:39:41 +01:00
json.training do
json.id slot.availability.trainings.first.id
json.name slot.availability.trainings.first.name
json.description slot.availability.trainings.first.description
json.machines slot.availability.trainings.first.machines do |m|
2016-03-23 18:39:41 +01:00
json.id m.id
json.name m.name
end
end
end