fix error

This commit is contained in:
chiu 2021-09-05 13:27:30 +08:00
parent 7eb87f23f5
commit 983d747bf0
1 changed files with 2 additions and 2 deletions

View File

@ -128,7 +128,7 @@ class Event
self.all.collect do |re| self.all.collect do |re|
edit_url = Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>re.id) edit_url = Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>re.id)
delete_url = Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>re.id) delete_url = Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>re.id)
{:id => re.id.to_s, :title=>re.title, :note=>re.note || "", :allDay => re.all_day, :recurring => re.recurring, :calendar => re.calendar_type.id.to_s, :color => re.calendar_type.color, :edit_url => edit_url, :delete_url => delete_url, :url_linked => re.url_to_fronted, :start => re.start, :end => re.end} {:id => re.id.to_s, :title=>re.title, :note=>re.note || "", :allDay => re.all_day, :recurring => re.recurring, :calendar => re.calendar_type.id.to_s, :color => (re.calendar_type.color rescue nil), :edit_url => edit_url, :delete_url => delete_url, :url_linked => re.url_to_fronted, :start => re.start, :end => re.end}
end end
end end
def self.get_diff_month(date1,date2) def self.get_diff_month(date1,date2)
@ -140,7 +140,7 @@ class Event
@recurring_events.each do |re| @recurring_events.each do |re|
edit_url = Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>re.id) edit_url = Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>re.id)
delete_url = Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>re.id) delete_url = Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>re.id)
data = {:id => re.id.to_s, :title=>re.title, :note=>re.note || "", :allDay => re.all_day, :recurring => re.recurring, :calendar => re.calendar_type.id.to_s, :color => re.calendar_type.color, :edit_url => edit_url, :delete_url => delete_url, :url_linked => re.url_to_fronted} data = {:id => re.id.to_s, :title=>re.title, :note=>re.note || "", :allDay => re.all_day, :recurring => re.recurring, :calendar => re.calendar_type.id.to_s, :color => (re.calendar_type.color rescue nil), :edit_url => edit_url, :delete_url => delete_url, :url_linked => re.url_to_fronted}
case re.period case re.period
when 'Daily' when 'Daily'
days = (end_date.to_date-re.start.to_date).to_i days = (end_date.to_date-re.start.to_date).to_i