This commit is contained in:
BoHung Chiu 2022-08-03 16:29:49 +08:00
parent 121fdbb51b
commit ba79afadd0
1 changed files with 5 additions and 3 deletions

View File

@ -170,7 +170,8 @@ class Event
:recurring => self.recurring,
:calendar => self.calendar_type_id.to_s,
:color => (self.calendar_type.color rescue nil),
:diff_day => self.all_day
:diff_day => self.all_day,
:url_linked => self.url
}
end
else
@ -195,6 +196,7 @@ class Event
:diff_day => self.all_day,
:edit_url => Rails.application.routes.url_helpers.edit_admin_calendar_path(:locale=>I18n.locale, :id=>self.id),
:delete_url => Rails.application.routes.url_helpers.admin_calendar_path(:locale=>I18n.locale, :id=>self.id),
:url_linked => self.url,
:hide => need_hide,
:org_color => org_color,
:hide_color => "#c0c0c0"
@ -277,7 +279,7 @@ class Event
add_interval -= @start_date.wday.day
need_check_start = true
end
start_date = [start_date, @start_date].max
tmp_start_date = [start_date, @start_date].max
@start_date += add_interval
@end_date += add_interval
new_end_date = has_recurring_end_date ? [re.recurring_end_date,end_date].min : end_date
@ -310,7 +312,7 @@ class Event
end
weekdays.each do |w|
new_start = (@start_date + w.day)
if need_check_start && new_start < start_date
if need_check_start && new_start < tmp_start_date
next
end
if new_start != org_start