1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

do not show title if calendar is configured to hide them

This commit is contained in:
Sylvain 2019-11-27 17:50:38 +01:00
parent 85d17d62f3
commit f72ae98109
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ class API::ICalendarController < API::ApiController
cals = Icalendar::Calendar.parse(ics)
cals.first.events.each do |evt|
@events.push(evt)
@events.push(calendar: i_cal, event: evt)
end
end
end

View File

@ -1,9 +1,9 @@
# frozen_string_literal: true
json.array!(@events) do |event|
json.id event.uid
json.title event.summary
json.start event.dtstart.iso8601
json.end event.dtend.iso8601
json.id event[:event].uid
json.title event[:calendar].text_hidden ? '' : event[:event].summary
json.start event[:event].dtstart.iso8601
json.end event[:event].dtend.iso8601
json.backgroundColor 'white'
end