1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-10 00:46:15 +01:00
fab-manager/app/views/api/trainings/show.json.jbuilder

12 lines
424 B
Plaintext
Raw Normal View History

2016-03-23 18:39:41 +01:00
json.extract! @training, :id, :name, :machine_ids, :nb_total_places
2016-06-24 18:36:36 +02:00
json.availabilities @training.availabilities do |a|
2016-03-23 18:39:41 +01:00
json.id a.id
json.start_at a.start_at.iso8601
json.end_at a.end_at.iso8601
json.reservation_users a.slots.map do |slot|
json.id slot.reservation.user.id
json.full_name slot.reservation.user.profile.full_name
json.is_valid slot.reservation.user.trainings.include?(@training)
2016-03-23 18:39:41 +01:00
end
end