(occurrence2)
| 18941 | } |
| 18942 | }; |
| 18943 | const handleFollowing = function(occurrence2) { |
| 18944 | let initialOccurrence = scheduler2._lame_clone(occurrence2); |
| 18945 | if (tempEndDate && tempStartDate) { |
| 18946 | occurrence2._start_date = occurrence2.start_date; |
| 18947 | occurrence2.start_date = tempStartDate; |
| 18948 | occurrence2.end_date = tempEndDate; |
| 18949 | } |
| 18950 | if (scheduler2._isFirstOccurrence(initialOccurrence) || scheduler2._isExceptionFirstOccurrence(initialOccurrence)) { |
| 18951 | if (scheduler2._isExceptionFirstOccurrence(initialOccurrence)) { |
| 18952 | deleteExceptionFromStorage(initialOccurrence); |
| 18953 | } |
| 18954 | tempEvent._start_date = event2.start_date; |
| 18955 | tempEvent.start_date = occurrence2.start_date; |
| 18956 | tempEvent.duration = (+occurrence2.end_date - +occurrence2.start_date) / 1e3; |
| 18957 | tempEvent._beforeEventChangedFlag = occurrence2._beforeEventChangedFlag; |
| 18958 | if (tempEvent.rrule) { |
| 18959 | updateFollowingRRULE(tempEvent.id, tempEvent); |
| 18960 | } |
| 18961 | if (!scheduler2.config.collision_limit || scheduler2.checkCollision(tempEvent)) { |
| 18962 | for (const i in scheduler2._events) { |
| 18963 | let tev = scheduler2._events[i]; |
| 18964 | if (tev.id == tempEvent.id) { |
| 18965 | scheduler2._events[i] = { ...tempEvent }; |
| 18966 | scheduler2.callEvent("onEventChanged", [scheduler2._events[i].id, scheduler2._events[i]]); |
| 18967 | } |
| 18968 | } |
| 18969 | } |
| 18970 | } else { |
| 18971 | tempEvent._end_date = event2.end_date; |
| 18972 | const originalStart = occurrence2.original_start || scheduler2.date.date_part(new Date(occurrence2._start_date)); |
| 18973 | tempEvent._shorten_end_date = new Date(originalStart.valueOf() - 1e3); |
| 18974 | tempEvent.end_date = occurrence2.end_date; |
| 18975 | tempEvent._start_date = event2.start_date; |
| 18976 | tempEvent.start_date = occurrence2.start_date; |
| 18977 | tempEvent._thisAndFollowing = occurrence2.id; |
| 18978 | if (tempEvent.rrule) { |
| 18979 | updateFollowingRRULE(tempEvent.id, tempEvent); |
| 18980 | } |
| 18981 | let tempEnd = tempEvent.end_date; |
| 18982 | tempEvent.end_date = tempEvent._end_date; |
| 18983 | if (!scheduler2.config.collision_limit || scheduler2.checkCollision(tempEvent)) { |
| 18984 | tempEvent.end_date = tempEnd; |
| 18985 | for (const i in scheduler2._events) { |
| 18986 | let tev = scheduler2._events[i]; |
| 18987 | if (tev.id == tempEvent.id) { |
| 18988 | scheduler2._events[i] = { ...tempEvent }; |
| 18989 | scheduler2.callEvent("onRecurringEventSave", [scheduler2._events[i].id, scheduler2._events[i], scheduler2._new_event]); |
| 18990 | scheduler2.callEvent("onEventChanged", [scheduler2._events[i].id, scheduler2._events[i]]); |
| 18991 | } |
| 18992 | } |
| 18993 | } |
| 18994 | } |
| 18995 | }; |
| 18996 | const handleAllEvents = function(occurrence2) { |
| 18997 | let initialOccurrence = scheduler2._lame_clone(occurrence2); |
| 18998 | if (scheduler2._isExceptionFirstOccurrence(initialOccurrence)) { |
no test coverage detected