2020-02-12 12:58:17 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2016-03-23 18:39:41 +01:00
|
|
|
json.array!(@availabilities) do |availability|
|
|
|
|
json.id availability.id
|
|
|
|
json.title availability.title
|
|
|
|
json.start availability.start_at.iso8601
|
|
|
|
json.end availability.end_at.iso8601
|
2020-04-15 18:08:02 +02:00
|
|
|
json.slot_duration availability.slot_duration
|
2016-03-23 18:39:41 +01:00
|
|
|
json.available_type availability.available_type
|
|
|
|
json.machine_ids availability.machine_ids
|
|
|
|
json.training_ids availability.training_ids
|
2019-11-25 14:49:39 +01:00
|
|
|
json.event_id availability.event&.id
|
2017-09-06 15:01:41 +02:00
|
|
|
json.backgroundColor !availability.lock ? 'white' : '#f5f5f5'
|
2016-06-28 12:45:41 +02:00
|
|
|
json.borderColor availability_border_color(availability)
|
2016-03-23 18:39:41 +01:00
|
|
|
json.tag_ids availability.tag_ids
|
2016-07-13 19:09:07 +02:00
|
|
|
json.tags availability.tags do |t|
|
|
|
|
json.id t.id
|
|
|
|
json.name t.name
|
|
|
|
end
|
2017-09-06 15:01:41 +02:00
|
|
|
json.lock availability.lock
|
2020-02-12 12:58:17 +01:00
|
|
|
json.plan_ids availability.plan_ids
|
2016-03-23 18:39:41 +01:00
|
|
|
end
|