1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00
fab-manager/app/views/api/availabilities/reservations.json.jbuilder

17 lines
554 B
Ruby

# frozen_string_literal: true
json.array!(@reservation_slots) do |slot|
json.slot_id slot.id
json.start_at slot.start_at.iso8601
json.end_at slot.end_at.iso8601
json.message slot.reservation.message
json.reservable slot.reservation.reservable
json.reservable_id slot.reservation.reservable_id
json.reservable_type slot.reservation.reservable_type
json.user do
json.id slot.reservation.statistic_profile&.user_id
json.name slot.reservation.statistic_profile&.user&.profile&.full_name
end
json.canceled_at slot.canceled_at
end